/openbmc/linux/drivers/pwm/ |
H A D | pwm-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Inspired by timer-stm32.c from Maxime Coquelin 8 * pwm-atmel.c from Bo Shen 12 #include <linux/mfd/stm32-timers.h> 17 #include <linux/pwm.h> 31 struct mutex lock; /* protect pwm config/enable */ 50 regmap_read(dev->regmap, TIM_CCER, &ccer); in active_channels() 59 return regmap_write(dev->regmap, TIM_CCR1, value); in write_ccrx() 61 return regmap_write(dev->regmap, TIM_CCR2, value); in write_ccrx() 63 return regmap_write(dev->regmap, TIM_CCR3, value); in write_ccrx() [all …]
|
H A D | pwm-tiehrpwm.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * EHRPWM PWM driver 5 * Copyright (C) 2012 Texas Instruments, Inc. - https://www.ti.com/ 10 #include <linux/pwm.h> 94 #define NUM_PWM_CHANNEL 2 /* EHRPWM channels */ 133 static void ehrpwm_modify(void __iomem *base, unsigned int offset, u16 mask, in ehrpwm_modify() argument 139 val &= ~mask; in ehrpwm_modify() 140 val |= value & mask; in ehrpwm_modify() 145 * set_prescale_div - Set up the prescaler divider function 187 * Configure PWM output to HIGH/LOW level on counter in configure_polarity() [all …]
|
H A D | pwm-jz4740.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> 4 * JZ4740 platform PWM support 7 * - The .apply callback doesn't complete the currently running period before 15 #include <linux/mfd/ingenic-tcu.h> 20 #include <linux/pwm.h> 40 /* Enable all TCU channels for PWM use by default except channels 0/1 */ in jz4740_pwm_can_use_chn() 41 u32 pwm_channels_mask = GENMASK(jz->chip.npwm - 1, 2); in jz4740_pwm_can_use_chn() 43 device_property_read_u32(jz->chip.dev->parent, in jz4740_pwm_can_use_chn() 44 "ingenic,pwm-channels-mask", in jz4740_pwm_can_use_chn() [all …]
|
H A D | pwm-meson.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * PWM controller driver for Amlogic Meson SoCs. 5 * This PWM is only a set of Gates, Dividers and Counters: 6 * PWM output is achieved by calculating a clock that permits calculating 13 * Setting the duty cycle will disable and re-enable the PWM output. 14 * Disabling the PWM stops the output immediately (without waiting for the 17 * The public S912 (GXM) datasheet contains some documentation for this PWM 19 * https://dl.khadas.com/Hardware/VIM2/Datasheet/S912_Datasheet_V0.220170314publicversion-Wesion.pdf 23 * https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf 33 #include <linux/clk-provider.h> [all …]
|
H A D | pwm-microchip-core.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2021-2023 Microchip Corporation. All rights reserved. 8 * https://www.microsemi.com/document-portal/doc_download/1245275-corepwm-hb 11 * - If the IP block is configured without "shadow registers", all register 16 * will take effective immediately, even for those channels. 19 * - The IP block has no concept of a duty cycle, only rising/falling edges of 28 * - The PWM period is set for the whole IP block not per channel. The driver 29 * will only change the period if no other PWM output is enabled. 42 #include <linux/pwm.h> 71 static void mchp_core_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm, in mchp_core_pwm_enable() argument [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/pwm/ |
H A D | microchip,corepwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/pwm/microchip,corepwm.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Conor Dooley <conor.dooley@microchip.com> 16 https://www.microsemi.com/existing-parts/parts/152118 19 - $ref: pwm.yaml# 24 - const: microchip,corepwm-rtl-v4 32 "#pwm-cells": 37 microchip,sync-update-mask: [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | lp3943.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * LP3943 is an integrated device capable of driving 16 output channels. 11 * It can be used for a GPIO expander and PWM generators. 16 * LP3943 MFD ---- GPIO expander leds-gpio eg) HW enable pin 18 * --- PWM generator leds-pwm eg) PWM input 20 * Internal two PWM channels are used for LED dimming effect. 23 * LEDs can be controlled with legacy leds-gpio(static brightness) or 24 * leds-pwm drivers(dynamic brightness control). 25 * Alternatively, it can be used for generic GPIO and PWM controller. 27 * A PWM is input pin of a backlight device. [all …]
|
/openbmc/linux/drivers/leds/rgb/ |
H A D | leds-qcom-lpg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2017-2022 Linaro Ltd 4 * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. 9 #include <linux/led-class-multicolor.h> 13 #include <linux/pwm.h> 40 #define PWM_DTEST_REG(x) (0xe2 + (x) - 1) 58 * struct lpg - LPG device context 61 * @lock: used to synchronize LED and pwm callback requests 62 * @pwm: PWM-chip object, if operating in PWM mode 68 * @triled_src: power-source for the TRILED [all …]
|
/openbmc/linux/drivers/clocksource/ |
H A D | samsung_pwm_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * samsung - Common hr-timer support (s3c and s5p) 45 * bits (one channel) after channel 0, so channels have different numbering 49 * in its set of bits is 2 as opposed to 3 for other channels. 79 static struct samsung_pwm_clocksource pwm; variable 92 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 94 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale() 95 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 107 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor() 111 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor() [all …]
|
H A D | ingenic-timer.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/mfd/ingenic-tcu.h> 23 #include <dt-bindings/clock/ingenic,tcu.h> 56 regmap_read(tcu->map, TCU_REG_TCNTc(tcu->cs_channel), &count); in ingenic_tcu_timer_read() 69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu() 83 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown() 95 return -EINVAL; in ingenic_tcu_cevt_set_next() 97 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next() 98 regmap_write(tcu->map, TCU_REG_TCNTc(timer->channel), 0); in ingenic_tcu_cevt_set_next() 99 regmap_write(tcu->map, TCU_REG_TESR, BIT(timer->channel)); in ingenic_tcu_cevt_set_next() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/timer/ |
H A D | ingenic,tcu.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 Documentation/arch/mips/ingenic-tcu.rst. 14 - Paul Cercueil <paul@crapouillou.net> 21 - ingenic,jz4740-tcu 22 - ingenic,jz4725b-tcu 23 - ingenic,jz4760-tcu 24 - ingenic,jz4760b-tcu 25 - ingenic,jz4770-tcu [all …]
|
/openbmc/linux/include/linux/fsl/ |
H A D | ftm.h | 1 // SPDX-License-Identifier: GPL-2.0 13 #define FTM_OUTINIT 0x5C /* Initial State For Channels Output */ 14 #define FTM_OUTMASK 0x60 /* Output Mask */ 15 #define FTM_COMBINE 0x64 /* Function For Linked Channels */ 18 #define FTM_POL 0x70 /* Channels Polarity */ 28 #define FTM_PWMLOAD 0x98 /* FTM PWM Load */ 57 * https://community.nxp.com/thread/467648#comment-1010319
|
/openbmc/linux/arch/arm/boot/dts/intel/pxa/ |
H A D | pxa3xx.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 7 (gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \ 8 (gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \ 9 (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \ 18 (gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \ 19 (gpio <= 29) ? (0x0400 + 4 * (gpio - 27)) : \ 20 (gpio <= 98) ? (0x0418 + 4 * (gpio - 30)) : \ 21 (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \ 23 (gpio <= 268) ? (0x052c + 4 * (gpio - 263)) : \ 33 (gpio <= 9) ? (0x028c + 4 * (gpio - 5)) : \ [all …]
|
/openbmc/linux/arch/arm64/boot/dts/amlogic/ |
H A D | meson-g12a-sei510.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "meson-g12a.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/gpio/meson-g12a-gpio.h> 12 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 19 compatible = "adc-keys"; 20 io-channels = <&saradc 0>; 21 io-channel-names = "buttons"; [all …]
|
H A D | meson-g12b-bananapi.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 8 #include <dt-bindings/input/input.h> 9 #include <dt-bindings/leds/common.h> 10 #include <dt-bindings/gpio/meson-g12a-gpio.h> 11 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 21 stdout-path = "serial0:115200n8"; 29 adc-keys { 30 compatible = "adc-keys"; 31 io-channels = <&saradc 2>; 32 io-channel-names = "buttons"; [all …]
|
H A D | meson-sm1-sei610.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include "meson-sm1.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/gpio/meson-g12a-gpio.h> 12 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 23 mono_dac: audio-codec-0 { 25 #sound-dai-cells = <0>; 26 sound-name-prefix = "U16"; [all …]
|
/openbmc/linux/include/soc/at91/ |
H A D | atmel_tcb.h | 17 * Many 32-bit Atmel SOCs include one or more TC blocks, each of which holds 18 * three general-purpose 16-bit timers. These timers share one register bank. 23 * clocks or clock gates, and per-timer TIOA and TIOB signals used for PWM 37 * struct atmel_tcb_config - SoC data for a Timer/Counter Block 50 * struct atmel_tc - information about a Timer/Counter Block 55 * @irq: irq for each of the three channels 56 * @clk: internal clock source for each of the three channels 61 * while on others, all TC channels share the same clock and IRQ. 80 /* platform-specific ATMEL_TC_TIMER_CLOCKx divisors (0 means 32KiHz) */ 85 * Two registers have block-wide controls. These are: configuring the three [all …]
|
/openbmc/linux/arch/arm/boot/dts/ti/omap/ |
H A D | omap2.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/ 8 #include <dt-bindings/bus/ti-sysc.h> 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/pinctrl/omap.h> 15 interrupt-parent = <&intc>; 16 #address-cells = <1>; 17 #size-cells = <1>; 29 #address-cells = <0>; [all …]
|
H A D | dm816x.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 #include <dt-bindings/bus/ti-sysc.h> 4 #include <dt-bindings/clock/dm816.h> 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/pinctrl/omap.h> 10 interrupt-parent = <&intc>; 11 #address-cells = <1>; 12 #size-cells = <1>; 26 #address-cells = <1>; 27 #size-cells = <0>; [all …]
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | stm32mp157c.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved 6 #include <dt-bindings/interrupt-controller/arm-gic.h> 7 #include <dt-bindings/clock/stm32mp1-clks.h> 8 #include <dt-bindings/reset/stm32mp1-resets.h> 11 #address-cells = <1>; 12 #size-cells = <1>; 15 #address-cells = <1>; 16 #size-cells = <0>; 19 compatible = "arm,cortex-a7"; [all …]
|
/openbmc/linux/drivers/input/keyboard/ |
H A D | lm8323.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2007-2009 Nokia Corporation 45 #define LM8323_CMD_PWM_WRITE 0x95 /* Write PWM script. */ 46 #define LM8323_CMD_START_PWM 0x96 /* Start PWM engine. */ 47 #define LM8323_CMD_STOP_PWM 0x97 /* Stop PWM engine. */ 87 /* Commands for PWM engine; feed in with PWM_WRITE. */ 88 /* Load ramp counter from duty cycle field (range 0 - 0xff). */ 111 * Wait for trigger. Argument is a mask of channels, shifted by the channel 112 * number, e.g. 0xa for channels 3 and 1. Note that channels are numbered 126 /* pwm lock */ [all …]
|
/openbmc/linux/arch/arm/boot/dts/nxp/ls/ |
H A D | ls1021a.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Copyright 2013-2014 Freescale Semiconductor, Inc. 6 #include <dt-bindings/interrupt-controller/arm-gic.h> 7 #include <dt-bindings/thermal/thermal.h> 10 #address-cells = <2>; 11 #size-cells = <2>; 12 interrupt-parent = <&gic>; 30 #address-cells = <1>; 31 #size-cells = <0>; 34 compatible = "arm,cortex-a7"; [all …]
|
/openbmc/linux/arch/arm/boot/dts/renesas/ |
H A D | r8a7742.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/clock/r8a7742-cpg-mssr.h> 9 #include <dt-bindings/interrupt-controller/arm-gic.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/power/r8a7742-sysc.h> 15 #address-cells = <2>; 16 #size-cells = <2>; 24 compatible = "fixed-clock"; 25 #clock-cells = <0>; 26 clock-frequency = <0>; [all …]
|
H A D | r8a7790.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Device Tree Source for the R-Car H2 (R8A77900) SoC 6 * Copyright (C) 2013-2014 Renesas Solutions Corp. 10 #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 11 #include <dt-bindings/interrupt-controller/arm-gic.h> 12 #include <dt-bindings/interrupt-controller/irq.h> 13 #include <dt-bindings/power/r8a7790-sysc.h> 17 #address-cells = <2>; 18 #size-cells = <2>; 46 compatible = "fixed-clock"; [all …]
|
/openbmc/linux/drivers/leds/ |
H A D | leds-lp5521.c | 1 // SPDX-License-Identifier: GPL-2.0-only 18 #include <linux/platform_data/leds-lp55xx.h> 22 #include "leds-lp55xx-common.h" 51 #define LP5521_LOGARITHMIC_PWM 0x80 /* Logarithmic PWM adjustment */ 59 #define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */ 113 led->led_current = led_current; in lp5521_set_led_current() 114 lp55xx_write(led->chip, LP5521_REG_LED_CURRENT_BASE + led->chan_nr, in lp5521_set_led_current() 120 enum lp55xx_engine_index idx = chip->engine_idx; in lp5521_load_engine() 121 static const u8 mask[] = { in lp5521_load_engine() local 133 lp55xx_update_bits(chip, LP5521_REG_OP_MODE, mask[idx], val[idx]); in lp5521_load_engine() [all …]
|