/linux-6.12.1/drivers/pwm/ |
D | Kconfig | 2 menuconfig PWM config 3 bool "Pulse-Width Modulation (PWM) Support" 5 Generic Pulse-Width Modulation (PWM) support. 14 This framework provides a generic interface to PWM devices 16 to register and unregister a PWM chip, an abstraction of a PWM 17 controller, that supports one or more PWM devices. Client 18 drivers can request PWM devices and use the generic framework 21 This generic framework replaces the legacy PWM framework which 30 if PWM 33 bool "PWM lowlevel drivers additional checks and debug messages" [all …]
|
D | Makefile | 3 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o 4 obj-$(CONFIG_PWM_ADP5585) += pwm-adp5585.o 5 obj-$(CONFIG_PWM_APPLE) += pwm-apple.o 6 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o 7 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o 8 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o 9 obj-$(CONFIG_PWM_AXI_PWMGEN) += pwm-axi-pwmgen.o 10 obj-$(CONFIG_PWM_BCM_IPROC) += pwm-bcm-iproc.o 11 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o 12 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o [all …]
|
D | core.c | 9 #define DEFAULT_SYMBOL_NAMESPACE PWM 15 #include <linux/pwm.h> 24 #include <dt-bindings/pwm/pwm.h> 27 #include <trace/events/pwm.h> 34 static void pwm_apply_debug(struct pwm_device *pwm, in pwm_apply_debug() argument 37 struct pwm_state *last = &pwm->last; in pwm_apply_debug() 38 struct pwm_chip *chip = pwm->chip; in pwm_apply_debug() 54 err = chip->ops->get_state(chip, pwm, &s1); in pwm_apply_debug() 55 trace_pwm_get(pwm, &s1, err); in pwm_apply_debug() 113 err = chip->ops->apply(chip, pwm, &s1); in pwm_apply_debug() [all …]
|
D | pwm-twl.c | 12 #include <linux/pwm.h> 32 #define TWL4030_PWM_TOGGLE(pwm, x) ((x) << (pwm)) argument 46 #define TWL6030_PWM_TOGGLE(pwm, x) ((x) << (pwm * 3)) argument 59 static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl_pwm_config() argument 75 * When on cycle == off cycle the PWM will be always on in twl_pwm_config() 82 base = pwm->hwpwm * 3; in twl_pwm_config() 88 dev_err(pwmchip_parent(chip), "%s: Failed to configure PWM\n", pwm->label); in twl_pwm_config() 93 static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in twl4030_pwm_enable() argument 102 dev_err(pwmchip_parent(chip), "%s: Failed to read GPBR1\n", pwm->label); in twl4030_pwm_enable() 106 val |= TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMXCLK_ENABLE); in twl4030_pwm_enable() [all …]
|
D | pwm-vt8500.c | 3 * drivers/pwm/pwm-vt8500.c 16 #include <linux/pwm.h> 28 #define REG_CTRL(pwm) (((pwm) << 4) + 0x00) argument 29 #define REG_SCALAR(pwm) (((pwm) << 4) + 0x04) argument 30 #define REG_PERIOD(pwm) (((pwm) << 4) + 0x08) argument 31 #define REG_DUTY(pwm) (((pwm) << 4) + 0x0C) argument 72 static int vt8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in vt8500_pwm_config() argument 108 writel(prescale, vt8500->base + REG_SCALAR(pwm->hwpwm)); in vt8500_pwm_config() 109 vt8500_pwm_busy_wait(chip, pwm->hwpwm, STATUS_SCALAR_UPDATE); in vt8500_pwm_config() 111 writel(pv, vt8500->base + REG_PERIOD(pwm->hwpwm)); in vt8500_pwm_config() [all …]
|
D | pwm-lpss.c | 3 * Intel Low Power Subsystem PWM controller driver 24 #include "pwm-lpss.h" 26 #define PWM 0x00000000 macro 32 /* Size of each PWM register space if multiple */ 74 static inline u32 pwm_lpss_read(const struct pwm_device *pwm) in pwm_lpss_read() argument 76 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_read() 78 return readl(lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_read() 81 static inline void pwm_lpss_write(const struct pwm_device *pwm, u32 value) in pwm_lpss_write() argument 83 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_write() 85 writel(value, lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_write() [all …]
|
D | pwm-twl-led.c | 8 * This driver is a complete rewrite of the former pwm-twl6030.c authorded by: 31 #include <linux/pwm.h> 36 * This driver handles the PWM driven LED terminals of TWL4030 and TWL6030. 73 static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl4030_pwmled_config() argument 89 * When on cycle == off cycle the PWM will be always on in twl4030_pwmled_config() 96 base = pwm->hwpwm * 2 + TWL4030_PWMA_REG; in twl4030_pwmled_config() 102 dev_err(pwmchip_parent(chip), "%s: Failed to configure PWM\n", pwm->label); in twl4030_pwmled_config() 107 static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) in twl4030_pwmled_enable() argument 116 dev_err(pwmchip_parent(chip), "%s: Failed to read LEDEN\n", pwm->label); in twl4030_pwmled_enable() 120 val |= TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); in twl4030_pwmled_enable() [all …]
|
D | pwm-stmpe.c | 15 #include <linux/pwm.h> 38 static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in stmpe_24xx_pwm_enable() argument 46 dev_dbg(pwmchip_parent(chip), "error reading PWM#%u control\n", in stmpe_24xx_pwm_enable() 47 pwm->hwpwm); in stmpe_24xx_pwm_enable() 51 value = ret | BIT(pwm->hwpwm); in stmpe_24xx_pwm_enable() 55 dev_dbg(pwmchip_parent(chip), "error writing PWM#%u control\n", in stmpe_24xx_pwm_enable() 56 pwm->hwpwm); in stmpe_24xx_pwm_enable() 64 struct pwm_device *pwm) in stmpe_24xx_pwm_disable() argument 72 dev_dbg(pwmchip_parent(chip), "error reading PWM#%u control\n", in stmpe_24xx_pwm_disable() 73 pwm->hwpwm); in stmpe_24xx_pwm_disable() [all …]
|
D | pwm-jz4740.c | 4 * JZ4740 platform PWM support 20 #include <linux/pwm.h> 39 /* Enable all TCU channels for PWM use by default except channels 0/1 */ in jz4740_pwm_can_use_chn() 43 "ingenic,pwm-channels-mask", in jz4740_pwm_can_use_chn() 49 static int jz4740_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_request() argument 56 if (!jz4740_pwm_can_use_chn(chip, pwm->hwpwm)) in jz4740_pwm_request() 59 snprintf(name, sizeof(name), "timer%u", pwm->hwpwm); in jz4740_pwm_request() 74 jz->clk[pwm->hwpwm] = clk; in jz4740_pwm_request() 79 static void jz4740_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_free() argument 82 struct clk *clk = jz->clk[pwm->hwpwm]; in jz4740_pwm_free() [all …]
|
D | pwm-samsung.c | 9 * PWM driver for Samsung SoCs 21 #include <linux/pwm.h> 59 * struct samsung_pwm_channel - private data of PWM channel 71 * struct samsung_pwm_chip - private data of PWM chip 75 * @base: base address of mapped PWM registers 95 * PWM block is shared between pwm-samsung and samsung_pwm_timer drivers 101 * because all the supported SoCs contain only one instance of the PWM 121 struct pwm_device *pwm) in __pwm_samsung_manual_update() argument 123 unsigned int tcon_chan = to_tcon_channel(pwm->hwpwm); in __pwm_samsung_manual_update() 200 "tclk of PWM %d is inoperational, using tdiv\n", chan); in pwm_samsung_calc_tin() [all …]
|
/linux-6.12.1/drivers/clocksource/ |
D | samsung_pwm_timer.c | 79 static struct samsung_pwm_clocksource pwm; variable 92 reg = readl(pwm.base + REG_TCFG0); 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() 114 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 129 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop() 131 writel_relaxed(tcon, pwm.base + REG_TCON); in samsung_time_stop() 147 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_setup() 152 writel_relaxed(tcnt, pwm.base + REG_TCNTB(channel)); in samsung_time_setup() [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/pwm/ |
D | pwm-amlogic.yaml | 4 $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml# 7 title: Amlogic PWM 16 - amlogic,meson8b-pwm 17 - amlogic,meson-gxbb-pwm 18 - amlogic,meson-gxbb-ao-pwm 19 - amlogic,meson-axg-ee-pwm 20 - amlogic,meson-axg-ao-pwm 21 - amlogic,meson-g12a-ee-pwm 22 - amlogic,meson-g12a-ao-pwm-ab 23 - amlogic,meson-g12a-ao-pwm-cd [all …]
|
D | pwm.txt | 1 Specifying PWM information for devices 4 1) PWM user nodes 7 PWM users should specify a list of PWM devices that they want to use 8 with a property containing a 'pwm-list': 10 pwm-list ::= <single-pwm> [pwm-list] 11 single-pwm ::= <pwm-phandle> <pwm-specifier> 12 pwm-phandle : phandle to PWM controller node 13 pwm-specifier : array of #pwm-cells specifying the given PWM 16 PWM properties should be named "pwms". The exact meaning of each pwms 18 An optional property "pwm-names" may contain a list of strings to label [all …]
|
D | pwm-samsung.yaml | 4 $id: http://devicetree.org/schemas/pwm/pwm-samsung.yaml# 7 title: Samsung SoC PWM timers 14 Samsung SoCs contain PWM timer blocks which can be used for system clock source 15 and clock event timers, as well as to drive SoC outputs with PWM signal. Each 16 PWM timer block provides 5 PWM channels (not all of them can drive physical 25 - samsung,s3c2410-pwm # 16-bit, S3C24xx 26 - samsung,s3c6400-pwm # 32-bit, S3C64xx 27 - samsung,s5p6440-pwm # 32-bit, S5P64x0 28 - samsung,s5pc100-pwm # 32-bit, S5PC100, S5PV210, Exynos4210 rev0 SoCs 29 - samsung,exynos4210-pwm # 32-bit, Exynos [all …]
|
D | renesas,pwm-rcar.yaml | 4 $id: http://devicetree.org/schemas/pwm/renesas,pwm-rcar.yaml# 7 title: Renesas R-Car PWM Timer Controller 16 - renesas,pwm-r8a7742 # RZ/G1H 17 - renesas,pwm-r8a7743 # RZ/G1M 18 - renesas,pwm-r8a7744 # RZ/G1N 19 - renesas,pwm-r8a7745 # RZ/G1E 20 - renesas,pwm-r8a77470 # RZ/G1C 21 - renesas,pwm-r8a774a1 # RZ/G2M 22 - renesas,pwm-r8a774b1 # RZ/G2N 23 - renesas,pwm-r8a774c0 # RZ/G2E [all …]
|
D | imx-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/imx-pwm.yaml# 7 title: Freescale i.MX PWM controller 13 - $ref: pwm.yaml# 16 "#pwm-cells": 19 PWM_POLARITY_INVERTED. fsl,imx1-pwm does not support this flags. 25 - fsl,imx1-pwm 26 - fsl,imx27-pwm 29 - fsl,imx25-pwm 30 - fsl,imx31-pwm 31 - fsl,imx50-pwm [all …]
|
D | pwm-rockchip.yaml | 4 $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# 7 title: Rockchip PWM controller 15 - const: rockchip,rk2928-pwm 16 - const: rockchip,rk3288-pwm 17 - const: rockchip,rk3328-pwm 18 - const: rockchip,vop-pwm 20 - const: rockchip,rk3036-pwm 21 - const: rockchip,rk2928-pwm 24 - rockchip,rk3128-pwm 25 - rockchip,rk3368-pwm [all …]
|
D | allwinner,sun4i-a10-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/allwinner,sun4i-a10-pwm.yaml# 7 title: Allwinner A10 PWM 14 "#pwm-cells": 19 - const: allwinner,sun4i-a10-pwm 20 - const: allwinner,sun5i-a10s-pwm 21 - const: allwinner,sun5i-a13-pwm 22 - const: allwinner,sun7i-a20-pwm 23 - const: allwinner,sun8i-h3-pwm 25 - const: allwinner,sun8i-a83t-pwm 26 - const: allwinner,sun8i-h3-pwm [all …]
|
D | nvidia,tegra20-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/nvidia,tegra20-pwm.yaml# 17 - nvidia,tegra20-pwm 18 - nvidia,tegra186-pwm 22 - nvidia,tegra30-pwm 23 - nvidia,tegra114-pwm 24 - nvidia,tegra124-pwm 25 - nvidia,tegra132-pwm 26 - nvidia,tegra210-pwm 28 - nvidia,tegra20-pwm 31 - const: nvidia,tegra194-pwm [all …]
|
D | pwm-sifive.yaml | 5 $id: http://devicetree.org/schemas/pwm/pwm-sifive.yaml# 8 title: SiFive PWM controller 14 Unlike most other PWM controllers, the SiFive PWM controller currently 15 only supports one period for all channels in the PWM. All PWMs need to 18 achievable period. PWM RTL that corresponds to the IP block version 21 https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm 24 - $ref: pwm.yaml# 30 - sifive,fu540-c000-pwm 31 - sifive,fu740-c000-pwm 34 Should be "sifive,<chip>-pwm" and "sifive,pwm<version>". Supported [all …]
|
D | mediatek,mt2712-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/mediatek,mt2712-pwm.yaml# 7 title: MediaTek PWM Controller 13 - $ref: pwm.yaml# 19 - mediatek,mt2712-pwm 20 - mediatek,mt6795-pwm 21 - mediatek,mt7622-pwm 22 - mediatek,mt7623-pwm 23 - mediatek,mt7628-pwm 24 - mediatek,mt7629-pwm 25 - mediatek,mt7981-pwm [all …]
|
D | mediatek,pwm-disp.yaml | 4 $id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml# 13 - $ref: pwm.yaml# 19 - mediatek,mt2701-disp-pwm 20 - mediatek,mt6595-disp-pwm 21 - mediatek,mt8173-disp-pwm 22 - mediatek,mt8183-disp-pwm 25 - mediatek,mt6795-disp-pwm 26 - mediatek,mt8167-disp-pwm 27 - const: mediatek,mt8173-disp-pwm 30 - mediatek,mt8186-disp-pwm [all …]
|
/linux-6.12.1/include/linux/ |
D | pwm.h | 11 MODULE_IMPORT_NS(PWM); 16 * enum pwm_polarity - polarity of a PWM signal 30 * struct pwm_args - board-dependent PWM arguments 34 * This structure describes board-dependent arguments attached to a PWM 35 * device. These arguments are usually retrieved from the PWM lookup table or 38 * Do not confuse this with the PWM state: PWM arguments represent the initial 39 * configuration that users want to use on this PWM device rather than the 40 * current PWM hardware state. 53 * struct pwm_state - state of a PWM channel 54 * @period: PWM period (in nanoseconds) [all …]
|
/linux-6.12.1/Documentation/driver-api/ |
D | pwm.rst | 2 Pulse Width Modulation (PWM) interface 5 This provides an overview about the Linux PWM interface 9 the Linux PWM API (although they could). However, PWMs are often 12 this kind of flexibility the generic PWM API exists. 17 Users of the legacy PWM API use unique IDs to refer to PWM devices. 19 Instead of referring to a PWM device via its unique ID, board setup code 20 should instead register a static mapping that can be used to match PWM 24 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, 39 consumer name. pwm_put() is used to free the PWM device. Managed variants of 42 After being requested, a PWM has to be configured using:: [all …]
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | sysfs-class-pwm | 1 What: /sys/class/pwm/ 6 The pwm/ class sub-directory belongs to the Generic PWM 7 Framework and provides a sysfs interface for using PWM 10 What: /sys/class/pwm/pwmchip<N>/ 15 A /sys/class/pwm/pwmchipN directory is created for each 16 probed PWM controller/chip where N is the base of the 17 PWM chip. 19 What: /sys/class/pwm/pwmchip<N>/npwm 24 The number of PWM channels supported by the PWM chip. 26 What: /sys/class/pwm/pwmchip<N>/export [all …]
|