/linux-5.19.10/drivers/pwm/ |
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 | core.c | 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() 58 struct pwm_device *pwm = &chip->pwms[i]; in free_pwms() local 60 radix_tree_delete(&pwm_tree, pwm->pwm); in free_pwms() 92 static int pwm_device_request(struct pwm_device *pwm, const char *label) in pwm_device_request() argument 96 if (test_bit(PWMF_REQUESTED, &pwm->flags)) in pwm_device_request() 99 if (!try_module_get(pwm->chip->ops->owner)) in pwm_device_request() 102 if (pwm->chip->ops->request) { in pwm_device_request() 103 err = pwm->chip->ops->request(pwm->chip, pwm); in pwm_device_request() 105 module_put(pwm->chip->ops->owner); in pwm_device_request() [all …]
|
D | pwm-twl.c | 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 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() 111 dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); in twl4030_pwm_enable() 113 val |= TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMX_ENABLE); in twl4030_pwm_enable() [all …]
|
D | sysfs.c | 19 struct pwm_device *pwm; member 33 return export->pwm; in child_to_pwm_device() 40 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show() local 43 pwm_get_state(pwm, &state); in period_show() 53 struct pwm_device *pwm = export->pwm; in period_store() local 63 pwm_get_state(pwm, &state); in period_store() 65 ret = pwm_apply_state(pwm, &state); in period_store() 75 const struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_show() local 78 pwm_get_state(pwm, &state); in duty_cycle_show() 88 struct pwm_device *pwm = export->pwm; in duty_cycle_store() local [all …]
|
D | pwm-vt8500.c | 31 #define REG_CTRL(pwm) (((pwm) << 4) + 0x00) argument 32 #define REG_SCALAR(pwm) (((pwm) << 4) + 0x04) argument 33 #define REG_PERIOD(pwm) (((pwm) << 4) + 0x08) argument 34 #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(vt8500, pwm->hwpwm, STATUS_SCALAR_UPDATE); in vt8500_pwm_config() 111 writel(pv, vt8500->base + REG_PERIOD(pwm->hwpwm)); in vt8500_pwm_config() 112 vt8500_pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_PERIOD_UPDATE); in vt8500_pwm_config() 114 writel(dc, vt8500->base + REG_DUTY(pwm->hwpwm)); in vt8500_pwm_config() [all …]
|
D | pwm-lpss.c | 37 static inline u32 pwm_lpss_read(const struct pwm_device *pwm) in pwm_lpss_read() argument 39 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_read() 41 return readl(lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_read() 44 static inline void pwm_lpss_write(const struct pwm_device *pwm, u32 value) in pwm_lpss_write() argument 46 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_write() 48 writel(value, lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_write() 51 static int pwm_lpss_wait_for_update(struct pwm_device *pwm) in pwm_lpss_wait_for_update() argument 53 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_wait_for_update() 54 const void __iomem *addr = lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM; in pwm_lpss_wait_for_update() 72 dev_err(pwm->chip->dev, "PWM_SW_UPDATE was not cleared\n"); in pwm_lpss_wait_for_update() [all …]
|
D | pwm-twl-led.c | 58 static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl4030_pwmled_config() argument 81 base = pwm->hwpwm * 2 + TWL4030_PWMA_REG; in twl4030_pwmled_config() 87 dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label); in twl4030_pwmled_config() 92 static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) in twl4030_pwmled_enable() argument 101 dev_err(chip->dev, "%s: Failed to read LEDEN\n", pwm->label); in twl4030_pwmled_enable() 105 val |= TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); in twl4030_pwmled_enable() 109 dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); in twl4030_pwmled_enable() 117 struct pwm_device *pwm) in twl4030_pwmled_disable() argument 126 dev_err(chip->dev, "%s: Failed to read LEDEN\n", pwm->label); in twl4030_pwmled_disable() 130 val &= ~TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); in twl4030_pwmled_disable() [all …]
|
D | pwm-stmpe.c | 39 static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in stmpe_24xx_pwm_enable() argument 48 pwm->hwpwm); in stmpe_24xx_pwm_enable() 52 value = ret | BIT(pwm->hwpwm); in stmpe_24xx_pwm_enable() 57 pwm->hwpwm); in stmpe_24xx_pwm_enable() 65 struct pwm_device *pwm) in stmpe_24xx_pwm_disable() argument 74 pwm->hwpwm); in stmpe_24xx_pwm_disable() 78 value = ret & ~BIT(pwm->hwpwm); in stmpe_24xx_pwm_disable() 83 pwm->hwpwm); in stmpe_24xx_pwm_disable() 99 static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in stmpe_24xx_pwm_config() argument 113 if (pwm_is_enabled(pwm)) { in stmpe_24xx_pwm_config() [all …]
|
D | pwm-jz4740.c | 50 static int jz4740_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_request() argument 57 if (!jz4740_pwm_can_use_chn(jz, pwm->hwpwm)) in jz4740_pwm_request() 60 snprintf(name, sizeof(name), "timer%u", pwm->hwpwm); in jz4740_pwm_request() 73 pwm_set_chip_data(pwm, clk); in jz4740_pwm_request() 78 static void jz4740_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_free() argument 80 struct clk *clk = pwm_get_chip_data(pwm); in jz4740_pwm_free() 86 static int jz4740_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_enable() argument 91 regmap_update_bits(jz->map, TCU_REG_TCSRc(pwm->hwpwm), in jz4740_pwm_enable() 95 regmap_write(jz->map, TCU_REG_TESR, BIT(pwm->hwpwm)); in jz4740_pwm_enable() 100 static void jz4740_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) in jz4740_pwm_disable() argument [all …]
|
D | pwm-samsung.c | 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() 134 static void pwm_samsung_set_divisor(struct samsung_pwm_chip *pwm, in pwm_samsung_set_divisor() argument 142 bits = (fls(divisor) - 1) - pwm->variant.div_base; in pwm_samsung_set_divisor() 146 reg = readl(pwm->base + REG_TCFG1); in pwm_samsung_set_divisor() 149 writel(reg, pwm->base + REG_TCFG1); in pwm_samsung_set_divisor() 228 static int pwm_samsung_request(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_samsung_request() argument 233 if (!(our_chip->variant.output_mask & BIT(pwm->hwpwm))) { in pwm_samsung_request() 236 pwm->hwpwm); in pwm_samsung_request() 244 pwm_set_chip_data(pwm, our_chan); in pwm_samsung_request() [all …]
|
D | pwm-crc.c | 54 static int crc_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, in crc_pwm_apply() argument 69 if (pwm_is_enabled(pwm) && !state->enabled) { in crc_pwm_apply() 77 if (pwm_get_duty_cycle(pwm) != state->duty_cycle || in crc_pwm_apply() 78 pwm_get_period(pwm) != state->period) { in crc_pwm_apply() 90 if (pwm_is_enabled(pwm) && state->enabled && in crc_pwm_apply() 91 pwm_get_period(pwm) != state->period) { in crc_pwm_apply() 100 if (pwm_get_period(pwm) != state->period || in crc_pwm_apply() 101 pwm_is_enabled(pwm) != state->enabled) { in crc_pwm_apply() 113 if (!pwm_is_enabled(pwm) && state->enabled) { in crc_pwm_apply() 124 static void crc_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, in crc_pwm_get_state() argument [all …]
|
/linux-5.19.10/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-5.19.10/include/linux/ |
D | pwm.h | 86 unsigned int pwm; member 105 static inline void pwm_get_state(const struct pwm_device *pwm, in pwm_get_state() argument 108 *state = pwm->state; in pwm_get_state() 111 static inline bool pwm_is_enabled(const struct pwm_device *pwm) in pwm_is_enabled() argument 115 pwm_get_state(pwm, &state); in pwm_is_enabled() 120 static inline void pwm_set_period(struct pwm_device *pwm, u64 period) in pwm_set_period() argument 122 if (pwm) in pwm_set_period() 123 pwm->state.period = period; in pwm_set_period() 126 static inline u64 pwm_get_period(const struct pwm_device *pwm) in pwm_get_period() argument 130 pwm_get_state(pwm, &state); in pwm_get_period() [all …]
|
/linux-5.19.10/Documentation/devicetree/bindings/pwm/ |
D | renesas,pwm-rcar.yaml | 4 $id: http://devicetree.org/schemas/pwm/renesas,pwm-rcar.yaml# 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 24 - renesas,pwm-r8a774e1 # RZ/G2H [all …]
|
D | imx-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/imx-pwm.yaml# 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 34 - fsl,imx51-pwm [all …]
|
D | pwm-rockchip.yaml | 4 $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# 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,rk3368-pwm 25 - rockchip,rk3399-pwm 26 - rockchip,rv1108-pwm [all …]
|
D | allwinner,sun4i-a10-pwm.yaml | 4 $id: http://devicetree.org/schemas/pwm/allwinner,sun4i-a10-pwm.yaml# 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 28 - const: allwinner,sun8i-v3s-pwm [all …]
|
D | pwm.txt | 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 18 An optional property "pwm-names" may contain a list of strings to label 19 each of the PWM devices listed in the "pwms" property. If no "pwm-names" 23 "pwm-names" property to map the name of the PWM device requested by the 29 pwm: pwm { 30 #pwm-cells = <2>; [all …]
|
D | mediatek,pwm-disp.yaml | 4 $id: http://devicetree.org/schemas/pwm/mediatek,pwm-disp.yaml# 14 - $ref: pwm.yaml# 20 - mediatek,mt2701-disp-pwm 21 - mediatek,mt6595-disp-pwm 22 - mediatek,mt8173-disp-pwm 23 - mediatek,mt8183-disp-pwm 25 - const: mediatek,mt8167-disp-pwm 26 - const: mediatek,mt8173-disp-pwm 29 - mediatek,mt8186-disp-pwm 30 - mediatek,mt8192-disp-pwm [all …]
|
D | pwm-samsung.yaml | 4 $id: http://devicetree.org/schemas/pwm/pwm-samsung.yaml# 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 42 - "pwm-tclk0" - first external PWM clock source, 43 - "pwm-tclk1" - second external PWM clock source. 52 - const: pwm-tclk0 55 - const: pwm-tclk1 [all …]
|
D | nvidia,tegra20-pwm.txt | 5 - "nvidia,tegra20-pwm": for Tegra20 6 - "nvidia,tegra30-pwm", "nvidia,tegra20-pwm": for Tegra30 7 - "nvidia,tegra114-pwm", "nvidia,tegra20-pwm": for Tegra114 8 - "nvidia,tegra124-pwm", "nvidia,tegra20-pwm": for Tegra124 9 - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132 10 - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210 11 - "nvidia,tegra186-pwm": for Tegra186 12 - "nvidia,tegra194-pwm": for Tegra194 14 - #pwm-cells: should be 2. See pwm.yaml in this directory for a description of 21 - pwm [all …]
|
D | atmel,at91sam-pwm.yaml | 5 $id: http://devicetree.org/schemas/pwm/atmel,at91sam-pwm.yaml# 14 - $ref: "pwm.yaml#" 21 - atmel,at91sam9rl-pwm 22 - atmel,sama5d3-pwm 23 - atmel,sama5d2-pwm 24 - microchip,sam9x60-pwm 26 - const: microchip,sama7g5-pwm 27 - const: atmel,sama5d2-pwm 32 "#pwm-cells": 43 pwm0: pwm@f8034000 { [all …]
|
D | pwm-meson.txt | 5 - compatible: Shall contain "amlogic,meson8b-pwm" 6 or "amlogic,meson-gxbb-pwm" 7 or "amlogic,meson-gxbb-ao-pwm" 8 or "amlogic,meson-axg-ee-pwm" 9 or "amlogic,meson-axg-ao-pwm" 10 or "amlogic,meson-g12a-ee-pwm" 11 or "amlogic,meson-g12a-ao-pwm-ab" 12 or "amlogic,meson-g12a-ao-pwm-cd" 13 - #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of 23 pwm_ab: pwm@8550 { [all …]
|
/linux-5.19.10/drivers/input/keyboard/ |
D | lm8323.c | 147 struct lm8323_pwm pwm[LM8323_NUM_PWMS]; member 351 static void pwm_done(struct lm8323_pwm *pwm) in pwm_done() argument 353 mutex_lock(&pwm->lock); in pwm_done() 354 pwm->running = false; in pwm_done() 355 if (pwm->desired_brightness != pwm->brightness) in pwm_done() 356 schedule_work(&pwm->work); in pwm_done() 357 mutex_unlock(&pwm->lock); in pwm_done() 392 pwm_done(&lm->pwm[i]); in lm8323_irq() 416 static void lm8323_write_pwm_one(struct lm8323_pwm *pwm, int pos, u16 cmd) in lm8323_write_pwm_one() argument 418 lm8323_write(pwm->chip, 4, LM8323_CMD_PWM_WRITE, (pos << 2) | pwm->id, in lm8323_write_pwm_one() [all …]
|
/linux-5.19.10/include/trace/events/ |
D | pwm.h | 3 #define TRACE_SYSTEM pwm 11 DECLARE_EVENT_CLASS(pwm, 13 TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state), 15 TP_ARGS(pwm, state), 18 __field(struct pwm_device *, pwm) 26 __entry->pwm = pwm; 34 __entry->pwm, __entry->period, __entry->duty_cycle, 39 DEFINE_EVENT(pwm, pwm_apply, 41 TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state), 43 TP_ARGS(pwm, state) [all …]
|