| /kernel/linux/linux-5.10/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 37 bool "PWM lowlevel drivers additional checks and debug messages" [all …]
|
| D | core.c | 11 #include <linux/pwm.h> 21 #include <dt-bindings/pwm/pwm.h> 24 #include <trace/events/pwm.h> 35 static struct pwm_device *pwm_to_device(unsigned int pwm) in pwm_to_device() argument 37 return radix_tree_lookup(&pwm_tree, pwm); in pwm_to_device() 40 static int alloc_pwms(int pwm, unsigned int count) in alloc_pwms() argument 45 if (pwm >= MAX_PWMS) in alloc_pwms() 48 if (pwm >= 0) in alloc_pwms() 49 from = pwm; in alloc_pwms() 54 if (pwm >= 0 && start != pwm) in alloc_pwms() [all …]
|
| D | Makefile | 4 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o 5 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o 6 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o 7 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o 8 obj-$(CONFIG_PWM_BCM_IPROC) += pwm-bcm-iproc.o 9 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o 10 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o 11 obj-$(CONFIG_PWM_BERLIN) += pwm-berlin.o 12 obj-$(CONFIG_PWM_BRCMSTB) += pwm-brcmstb.o 13 obj-$(CONFIG_PWM_CLPS711X) += pwm-clps711x.o [all …]
|
| D | pwm-renesas-tpu.c | 3 * R-Mobile TPU PWM driver 18 #include <linux/pwm.h> 63 TPU_PIN_PWM, /* Pin is driven by PWM */ 92 static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) in tpu_pwm_write() argument 94 void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET in tpu_pwm_write() 95 + pwm->channel * TPU_CHANNEL_SIZE; in tpu_pwm_write() 100 static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, in tpu_pwm_set_pin() argument 103 static const char * const states[] = { "inactive", "PWM", "active" }; in tpu_pwm_set_pin() 105 dev_dbg(&pwm->tpu->pdev->dev, "%u: configuring pin as %s\n", in tpu_pwm_set_pin() 106 pwm->channel, states[state]); in tpu_pwm_set_pin() [all …]
|
| D | pwm-berlin.c | 2 * Marvell Berlin PWM driver 18 #include <linux/pwm.h> 72 static int berlin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_request() argument 80 return pwm_set_chip_data(pwm, channel); in berlin_pwm_request() 83 static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_free() argument 85 struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm); in berlin_pwm_free() 93 struct berlin_pwm_chip *pwm = to_berlin_pwm_chip(chip); in berlin_pwm_config() local 98 cycles = clk_get_rate(pwm->clk); in berlin_pwm_config() 115 value = berlin_pwm_readl(pwm, pwm_dev->hwpwm, BERLIN_PWM_CONTROL); in berlin_pwm_config() 120 berlin_pwm_writel(pwm, pwm_dev->hwpwm, value, BERLIN_PWM_CONTROL); in berlin_pwm_config() [all …]
|
| /kernel/linux/linux-6.6/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 37 bool "PWM lowlevel drivers additional checks and debug messages" [all …]
|
| D | Makefile | 4 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.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_BCM_IPROC) += pwm-bcm-iproc.o 10 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o 11 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o 12 obj-$(CONFIG_PWM_BERLIN) += pwm-berlin.o 13 obj-$(CONFIG_PWM_BRCMSTB) += pwm-brcmstb.o [all …]
|
| D | core.c | 12 #include <linux/pwm.h> 21 #include <dt-bindings/pwm/pwm.h> 24 #include <trace/events/pwm.h> 85 static int pwm_device_request(struct pwm_device *pwm, const char *label) in pwm_device_request() argument 89 if (test_bit(PWMF_REQUESTED, &pwm->flags)) in pwm_device_request() 92 if (!try_module_get(pwm->chip->ops->owner)) in pwm_device_request() 95 if (pwm->chip->ops->request) { in pwm_device_request() 96 err = pwm->chip->ops->request(pwm->chip, pwm); in pwm_device_request() 98 module_put(pwm->chip->ops->owner); in pwm_device_request() 103 if (pwm->chip->ops->get_state) { in pwm_device_request() [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 60 static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl_pwm_config() argument 76 * When on cycle == off cycle the PWM will be always on in twl_pwm_config() 83 base = pwm->hwpwm * 3; in twl_pwm_config() 89 dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label); in twl_pwm_config() 94 static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in twl4030_pwm_enable() argument 103 dev_err(chip->dev, "%s: Failed to read GPBR1\n", pwm->label); in twl4030_pwm_enable() 107 val |= TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMXCLK_ENABLE); in twl4030_pwm_enable() [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | pwm.h | 12 * enum pwm_polarity - polarity of a PWM signal 26 * struct pwm_args - board-dependent PWM arguments 30 * This structure describes board-dependent arguments attached to a PWM 31 * device. These arguments are usually retrieved from the PWM lookup table or 34 * Do not confuse this with the PWM state: PWM arguments represent the initial 35 * configuration that users want to use on this PWM device rather than the 36 * current PWM hardware state. 49 * struct pwm_state - state of a PWM channel 50 * @period: PWM period (in nanoseconds) 51 * @duty_cycle: PWM duty cycle (in nanoseconds) [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | pwm.h | 15 * enum pwm_polarity - polarity of a PWM signal 29 * struct pwm_args - board-dependent PWM arguments 33 * This structure describes board-dependent arguments attached to a PWM 34 * device. These arguments are usually retrieved from the PWM lookup table or 37 * Do not confuse this with the PWM state: PWM arguments represent the initial 38 * configuration that users want to use on this PWM device rather than the 39 * current PWM hardware state. 52 * struct pwm_state - state of a PWM channel 53 * @period: PWM period (in nanoseconds) 54 * @duty_cycle: PWM duty cycle (in nanoseconds) [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/pwm/ |
| 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 | 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 | 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 | 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": 18 Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml 27 - fsl,imx1-pwm 28 - fsl,imx27-pwm 31 - fsl,imx25-pwm 32 - fsl,imx31-pwm 33 - fsl,imx50-pwm [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/pwm/ |
| 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 24 - samsung,s3c2410-pwm # 16-bit, S3C24xx 25 - samsung,s3c6400-pwm # 32-bit, S3C64xx 26 - samsung,s5p6440-pwm # 32-bit, S5P64x0 27 - samsung,s5pc100-pwm # 32-bit, S5PC100, S5PV210, Exynos4210 rev0 SoCs 28 - 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 "#pwm-cells": 15 Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml 24 - fsl,imx1-pwm 25 - fsl,imx27-pwm 28 - fsl,imx25-pwm 29 - fsl,imx31-pwm 30 - fsl,imx50-pwm 31 - fsl,imx51-pwm [all …]
|
| /kernel/linux/linux-5.10/drivers/clocksource/ |
| D | samsung_pwm_timer.c | 80 static struct samsung_pwm_clocksource pwm; variable 93 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 96 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 108 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor() 112 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 115 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 130 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop() 132 writel_relaxed(tcon, pwm.base + REG_TCON); in samsung_time_stop() 148 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_setup() 153 writel_relaxed(tcnt, pwm.base + REG_TCNTB(channel)); in samsung_time_setup() [all …]
|
| /kernel/linux/linux-5.10/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, 38 Legacy users can request a PWM device using pwm_request() and free it 42 device or a consumer name. pwm_put() is used to free the PWM device. Managed [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-5.10/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/pwmchipN/ 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/pwmchipN/npwm 24 The number of PWM channels supported by the PWM chip. 26 What: /sys/class/pwm/pwmchipN/export [all …]
|
| /kernel/linux/linux-6.6/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 …]
|