/linux/drivers/pwm/ |
H A 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_ARGON_FAN_HAT) += pwm-argon-fan-hat.o 7 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o 8 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o 9 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o 10 obj-$(CONFIG_PWM_AXI_PWMGEN) += pwm-axi-pwmgen.o 11 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o 12 obj-$(CONFIG_PWM_BCM_IPROC) += pwm [all...] |
H A D | core.c | 15 #include <linux/pwm.h> 24 #include <dt-bindings/pwm/pwm.h> 26 #include <uapi/linux/pwm.h> 29 #include <trace/events/pwm.h> 167 static int __pwm_round_waveform_tohw(struct pwm_chip *chip, struct pwm_device *pwm, in __pwm_round_waveform_tohw() argument 173 ret = ops->round_waveform_tohw(chip, pwm, wf, wfhw); in __pwm_round_waveform_tohw() 174 trace_pwm_round_waveform_tohw(pwm, wf, wfhw, ret); in __pwm_round_waveform_tohw() 179 static int __pwm_round_waveform_fromhw(struct pwm_chip *chip, struct pwm_device *pwm, in __pwm_round_waveform_fromhw() argument 185 ret = ops->round_waveform_fromhw(chip, pwm, wfh in __pwm_round_waveform_fromhw() 191 __pwm_read_waveform(struct pwm_chip * chip,struct pwm_device * pwm,void * wfhw) __pwm_read_waveform() argument 202 __pwm_write_waveform(struct pwm_chip * chip,struct pwm_device * pwm,const void * wfhw) __pwm_write_waveform() argument 244 pwm_round_waveform_might_sleep(struct pwm_device * pwm,struct pwm_waveform * wf) pwm_round_waveform_might_sleep() argument 303 pwm_get_waveform_might_sleep(struct pwm_device * pwm,struct pwm_waveform * wf) pwm_get_waveform_might_sleep() argument 329 __pwm_set_waveform(struct pwm_device * pwm,const struct pwm_waveform * wf,bool exact) __pwm_set_waveform() argument 442 pwm_set_waveform_might_sleep(struct pwm_device * pwm,const struct pwm_waveform * wf,bool exact) pwm_set_waveform_might_sleep() argument 484 pwm_apply_debug(struct pwm_device * pwm,const struct pwm_state * state) pwm_apply_debug() argument 613 __pwm_apply(struct pwm_device * pwm,const struct pwm_state * state) __pwm_apply() argument 725 pwm_apply_might_sleep(struct pwm_device * pwm,const struct pwm_state * state) pwm_apply_might_sleep() argument 769 pwm_apply_atomic(struct pwm_device * pwm,const struct pwm_state * state) pwm_apply_atomic() argument 796 pwm_get_state_hw(struct pwm_device * pwm,struct pwm_state * state) pwm_get_state_hw() argument 845 pwm_adjust_config(struct pwm_device * pwm) pwm_adjust_config() argument 901 pwm_capture(struct pwm_device * pwm,struct pwm_capture * result,unsigned long timeout) pwm_capture() argument 943 pwm_device_request(struct pwm_device * pwm,const char * label) pwm_device_request() argument 1016 struct pwm_device *pwm; pwm_request_from_chip() local 1036 struct pwm_device *pwm; of_pwm_xlate_with_flags() local 1073 struct pwm_device *pwm; of_pwm_single_xlate() local 1095 struct pwm_device *pwm; global() member 1121 const struct pwm_device *pwm = pwm_from_dev(pwm_dev); period_show() local 1134 struct pwm_device *pwm = export->pwm; period_store() local 1156 const struct pwm_device *pwm = pwm_from_dev(pwm_dev); duty_cycle_show() local 1169 struct pwm_device *pwm = export->pwm; duty_cycle_store() local 1191 const struct pwm_device *pwm = pwm_from_dev(pwm_dev); enable_show() local 1204 struct pwm_device *pwm = export->pwm; enable_store() local 1236 const struct pwm_device *pwm = pwm_from_dev(pwm_dev); polarity_show() local 1260 struct pwm_device *pwm = export->pwm; polarity_store() local 1285 struct pwm_device *pwm = pwm_from_dev(pwm_dev); capture_show() local 1319 pwm_export_child(struct device * pwmchip_dev,struct pwm_device * pwm) pwm_export_child() argument 1363 pwm_unexport_child(struct device * pwmchip_dev,struct pwm_device * pwm) pwm_unexport_child() argument 1393 struct pwm_device *pwm; export_store() local 1456 pwm_class_get_state(struct device * pwmchip_dev,struct pwm_device * pwm,struct pwm_state * state) pwm_class_get_state() argument 1479 pwm_class_apply_state(struct pwm_export * export,struct pwm_device * pwm,struct pwm_state * state) pwm_class_apply_state() argument 1497 struct pwm_device *pwm = &chip->pwms[i]; pwm_class_resume_npwm() local 1528 struct pwm_device *pwm = &chip->pwms[i]; pwm_class_suspend() local 1582 struct pwm_device *pwm = &chip->pwms[i]; pwmchip_sysfs_unexport() local 1637 struct pwm_device *pwm = &chip->pwms[i]; pwmchip_alloc() local 1714 pwm_device_link_add(struct device * dev,struct pwm_device * pwm) pwm_device_link_add() argument 1776 struct pwm_device *pwm = NULL; of_pwm_get() local 1855 struct pwm_device *pwm; acpi_pwm_get() local 1908 struct pwm_device *pwm; pwm_get() local 2012 __pwm_put(struct pwm_device * pwm) __pwm_put() argument 2040 pwm_put(struct pwm_device * pwm) pwm_put() argument 2051 devm_pwm_release(void * pwm) devm_pwm_release() argument 2069 struct pwm_device *pwm; devm_pwm_get() local 2100 struct pwm_device *pwm = ERR_PTR(-ENODEV); devm_fwnode_pwm_get() local 2120 struct pwm_device *pwm[]; global() member 2150 struct pwm_device *pwm = cdata->pwm[i]; pwm_cdev_release() local 2172 struct pwm_device *pwm = &chip->pwms[hwpwm]; pwm_cdev_request() local 2200 struct pwm_device *pwm = cdata->pwm[hwpwm]; pwm_cdev_free() local 2257 struct pwm_device *pwm; pwm_cdev_ioctl() local 2297 struct pwm_device *pwm; pwm_cdev_ioctl() local 2332 struct pwm_device *pwm; pwm_cdev_ioctl() local 2484 struct pwm_device *pwm = &chip->pwms[i]; pwmchip_remove() local 2557 struct pwm_device *pwm = &chip->pwms[i]; pwm_dbg_show() local [all...] |
H A 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 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 in twl4030_pwm_enable() 123 twl4030_pwm_disable(struct pwm_chip * chip,struct pwm_device * pwm) twl4030_pwm_disable() argument 152 twl4030_pwm_request(struct pwm_chip * chip,struct pwm_device * pwm) twl4030_pwm_request() argument 190 twl4030_pwm_free(struct pwm_chip * chip,struct pwm_device * pwm) twl4030_pwm_free() argument 220 twl6030_pwm_enable(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwm_enable() argument 243 twl6030_pwm_disable(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwm_disable() argument 281 twl4030_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) twl4030_pwm_apply() argument 306 twl6030_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) twl6030_pwm_apply() argument [all...] |
H A 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) (((pw argument 72 vt8500_pwm_config(struct pwm_chip * chip,struct pwm_device * pwm,u64 duty_ns,u64 period_ns) vt8500_pwm_config() argument 126 vt8500_pwm_enable(struct pwm_chip * chip,struct pwm_device * pwm) vt8500_pwm_enable() argument 146 vt8500_pwm_disable(struct pwm_chip * chip,struct pwm_device * pwm) vt8500_pwm_disable() argument 160 vt8500_pwm_set_polarity(struct pwm_chip * chip,struct pwm_device * pwm,enum pwm_polarity polarity) vt8500_pwm_set_polarity() argument 179 vt8500_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) vt8500_pwm_apply() argument [all...] |
H A 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> 69 static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, in twl4030_pwmled_config() argument 92 base = pwm->hwpwm * 2 + TWL4030_PWMA_REG; in twl4030_pwmled_config() 98 dev_err(pwmchip_parent(chip), "%s: Failed to configure PWM\n", pwm->label); in twl4030_pwmled_config() 103 static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) in twl4030_pwmled_enable() argument 110 dev_err(pwmchip_parent(chip), "%s: Failed to read LEDEN\n", pwm->label); in twl4030_pwmled_enable() 114 val |= TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); in twl4030_pwmled_enable() 118 dev_err(pwmchip_parent(chip), "%s: Failed to enable PWM\n", pwm->label); in twl4030_pwmled_enable() 124 struct pwm_device *pwm) in twl4030_pwmled_disable() argument 142 twl4030_pwmled_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) twl4030_pwmled_apply() argument 180 twl6030_pwmled_config(struct pwm_chip * chip,struct pwm_device * pwm,int duty_ns,int period_ns) twl6030_pwmled_config() argument 197 twl6030_pwmled_enable(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwmled_enable() argument 220 twl6030_pwmled_disable(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwmled_disable() argument 240 twl6030_pwmled_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) twl6030_pwmled_apply() argument 266 twl6030_pwmled_request(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwmled_request() argument 288 twl6030_pwmled_free(struct pwm_chip * chip,struct pwm_device * pwm) twl6030_pwmled_free() argument [all...] |
H A D | pwm-lpss.c | 22 #include <linux/pwm.h> 25 #include "pwm-lpss.h" 75 static inline u32 pwm_lpss_read(const struct pwm_device *pwm) in pwm_lpss_read() argument 77 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_read() 79 return readl(lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_read() 82 static inline void pwm_lpss_write(const struct pwm_device *pwm, u32 value) in pwm_lpss_write() argument 84 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_write() 86 writel(value, lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_write() 89 static int pwm_lpss_wait_for_update(struct pwm_device *pwm) in pwm_lpss_wait_for_update() argument 91 struct pwm_lpss_chip *lpwm = to_lpwm(pwm in pwm_lpss_wait_for_update() 115 pwm_lpss_is_updating(struct pwm_device * pwm) pwm_lpss_is_updating() argument 125 pwm_lpss_prepare(struct pwm_lpss_chip * lpwm,struct pwm_device * pwm,int duty_ns,int period_ns) pwm_lpss_prepare() argument 160 pwm_lpss_cond_enable(struct pwm_device * pwm,bool cond) pwm_lpss_cond_enable() argument 167 pwm_lpss_prepare_enable(struct pwm_lpss_chip * lpwm,struct pwm_device * pwm,const struct pwm_state * state) pwm_lpss_prepare_enable() argument 186 pwm_lpss_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) pwm_lpss_apply() argument 209 pwm_lpss_get_state(struct pwm_chip * chip,struct pwm_device * pwm,struct pwm_state * state) pwm_lpss_get_state() argument [all...] |
H A D | pwm-dwc-core.c | 20 #include <linux/pwm.h> 22 #include "pwm-dwc.h" 24 static void __dwc_pwm_set_enable(struct dwc_pwm *dwc, int pwm, int enabled) in __dwc_pwm_set_enable() argument 28 reg = dwc_pwm_readl(dwc, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable() 35 dwc_pwm_writel(dwc, reg, DWC_TIM_CTRL(pwm)); in __dwc_pwm_set_enable() 39 struct pwm_device *pwm, in __dwc_pwm_configure_timer() argument 70 __dwc_pwm_set_enable(dwc, pwm->hwpwm, false); in __dwc_pwm_configure_timer() 78 dwc_pwm_writel(dwc, low, DWC_TIM_LD_CNT(pwm->hwpwm)); in __dwc_pwm_configure_timer() 79 dwc_pwm_writel(dwc, high, DWC_TIM_LD_CNT2(pwm->hwpwm)); in __dwc_pwm_configure_timer() 88 dwc_pwm_writel(dwc, ctrl, DWC_TIM_CTRL(pwm in __dwc_pwm_configure_timer() 98 dwc_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) dwc_pwm_apply() argument 120 dwc_pwm_get_state(struct pwm_chip * chip,struct pwm_device * pwm,struct pwm_state * state) dwc_pwm_get_state() argument [all...] |
H A 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 47 pwm->hwpwm); in stmpe_24xx_pwm_enable() 51 value = ret | BIT(pwm->hwpwm); in stmpe_24xx_pwm_enable() 56 pwm->hwpwm); in stmpe_24xx_pwm_enable() 64 struct pwm_device *pwm) in stmpe_24xx_pwm_disable() argument 73 pwm->hwpwm); in stmpe_24xx_pwm_disable() 77 value = ret & ~BIT(pwm->hwpwm); in stmpe_24xx_pwm_disable() 82 pwm->hwpwm); in stmpe_24xx_pwm_disable() 97 static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in stmpe_24xx_pwm_config() argument 262 stmpe_24xx_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) stmpe_24xx_pwm_apply() argument [all...] |
H A D | pwm-sophgo-sg2042.c | 27 #include <linux/pwm.h> 78 static void pwm_sg2042_set_dutycycle(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_sg2042_set_dutycycle() argument 93 pwm->hwpwm, state->enabled, period_ticks, hlperiod_ticks, state->polarity); in pwm_sg2042_set_dutycycle() 95 pwm_sg2042_config(ddata, pwm->hwpwm, period_ticks, hlperiod_ticks); in pwm_sg2042_set_dutycycle() 98 static int pwm_sg2042_apply(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_sg2042_apply() argument 107 pwm_sg2042_config(ddata, pwm->hwpwm, 0, 0); in pwm_sg2042_apply() 111 pwm_sg2042_set_dutycycle(chip, pwm, state); in pwm_sg2042_apply() 116 static int pwm_sg2042_get_state(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_sg2042_get_state() argument 120 unsigned int chan = pwm->hwpwm; in pwm_sg2042_get_state() 143 static void pwm_sg2044_set_outputen(struct sg2042_pwm_ddata *ddata, struct pwm_device *pwm, in pwm_sg2044_set_outputen() argument 158 pwm_sg2044_set_outputdir(struct sg2042_pwm_ddata * ddata,struct pwm_device * pwm,bool enabled) pwm_sg2044_set_outputdir() argument 173 pwm_sg2044_set_polarity(struct sg2042_pwm_ddata * ddata,struct pwm_device * pwm,const struct pwm_state * state) pwm_sg2044_set_polarity() argument 188 pwm_sg2044_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) pwm_sg2044_apply() argument [all...] |
H A D | pwm-atmel.c | 29 #include <linux/pwm.h> 227 static void atmel_pwm_update_cdty(struct pwm_chip *chip, struct pwm_device *pwm, in atmel_pwm_update_cdty() argument 235 val = atmel_pwm_ch_readl(atmel_pwm, pwm->hwpwm, PWM_CMR); in atmel_pwm_update_cdty() 237 atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, PWM_CMR, val); in atmel_pwm_update_cdty() 240 atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, in atmel_pwm_update_cdty() 242 atmel_pwm_set_pending(atmel_pwm, pwm->hwpwm); in atmel_pwm_update_cdty() 246 struct pwm_device *pwm, in atmel_pwm_set_cprd_cdty() argument 251 atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, in atmel_pwm_set_cprd_cdty() 253 atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, in atmel_pwm_set_cprd_cdty() 257 static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm, in atmel_pwm_disable() argument 281 atmel_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) atmel_pwm_apply() argument 343 atmel_pwm_get_state(struct pwm_chip * chip,struct pwm_device * pwm,struct pwm_state * state) atmel_pwm_get_state() argument [all...] |
H A D | pwm-hibvt.c | 15 #include <linux/pwm.h> 82 static void hibvt_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in hibvt_pwm_enable() argument 86 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), in hibvt_pwm_enable() 90 static void hibvt_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) in hibvt_pwm_disable() argument 94 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), in hibvt_pwm_disable() 98 static void hibvt_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in hibvt_pwm_config() argument 109 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CFG0_ADDR(pwm->hwpwm), in hibvt_pwm_config() 112 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CFG1_ADDR(pwm->hwpwm), in hibvt_pwm_config() 117 struct pwm_device *pwm, in hibvt_pwm_set_polarity() argument 123 hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm in hibvt_pwm_set_polarity() 130 hibvt_pwm_get_state(struct pwm_chip * chip,struct pwm_device * pwm,struct pwm_state * state) hibvt_pwm_get_state() argument 153 hibvt_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) hibvt_pwm_apply() argument [all...] |
H A D | pwm-berlin.c | 19 #include <linux/pwm.h> 75 static int berlin_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, in berlin_pwm_config() argument 100 value = berlin_pwm_readl(bpc, pwm->hwpwm, BERLIN_PWM_CONTROL); in berlin_pwm_config() 105 berlin_pwm_writel(bpc, pwm->hwpwm, value, BERLIN_PWM_CONTROL); in berlin_pwm_config() 107 berlin_pwm_writel(bpc, pwm->hwpwm, duty, BERLIN_PWM_DUTY); in berlin_pwm_config() 108 berlin_pwm_writel(bpc, pwm->hwpwm, period, BERLIN_PWM_TCNT); in berlin_pwm_config() 114 struct pwm_device *pwm, in berlin_pwm_set_polarity() argument 120 value = berlin_pwm_readl(bpc, pwm->hwpwm, BERLIN_PWM_CONTROL); in berlin_pwm_set_polarity() 127 berlin_pwm_writel(bpc, pwm->hwpwm, value, BERLIN_PWM_CONTROL); in berlin_pwm_set_polarity() 132 static int berlin_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_enable() argument 145 berlin_pwm_disable(struct pwm_chip * chip,struct pwm_device * pwm) berlin_pwm_disable() argument 155 berlin_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) berlin_pwm_apply() argument [all...] |
H A D | pwm-microchip-core.c | 41 #include <linux/pwm.h> 68 static void mchp_core_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm, in mchp_core_pwm_enable() argument 76 * 0-7 and the upper reg 8-15. Check if the pwm is in the upper reg in mchp_core_pwm_enable() 79 reg_offset = MCHPCOREPWM_EN(pwm->hwpwm >> 3); in mchp_core_pwm_enable() 80 shift = pwm->hwpwm & 7; in mchp_core_pwm_enable() 87 mchp_core_pwm->channel_enabled &= ~BIT(pwm->hwpwm); in mchp_core_pwm_enable() 88 mchp_core_pwm->channel_enabled |= enable << pwm->hwpwm; in mchp_core_pwm_enable() 95 if (mchp_core_pwm->sync_update_mask & (1 << pwm->hwpwm)) in mchp_core_pwm_enable() 148 static void mchp_core_pwm_apply_duty(struct pwm_chip *chip, struct pwm_device *pwm, in mchp_core_pwm_apply_duty() argument 178 writel_relaxed(posedge, mchp_core_pwm->base + MCHPCOREPWM_POSEDGE(pwm in mchp_core_pwm_apply_duty() 271 mchp_core_pwm_apply_locked(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) mchp_core_pwm_apply_locked() argument 357 mchp_core_pwm_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) mchp_core_pwm_apply() argument 367 mchp_core_pwm_get_state(struct pwm_chip * chip,struct pwm_device * pwm,struct pwm_state * state) mchp_core_pwm_get_state() argument [all...] |
H A D | pwm-mediatek.c | 18 #include <linux/pwm.h> 80 struct pwm_device *pwm) in pwm_mediatek_clk_enable() argument 93 ret = clk_prepare_enable(pc->clk_pwms[pwm->hwpwm]); in pwm_mediatek_clk_enable() 108 struct pwm_device *pwm) in pwm_mediatek_clk_disable() argument 112 clk_disable_unprepare(pc->clk_pwms[pwm->hwpwm]); in pwm_mediatek_clk_disable() 124 static void pwm_mediatek_enable(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_mediatek_enable() argument 130 value |= BIT(pwm->hwpwm); in pwm_mediatek_enable() 134 static void pwm_mediatek_disable(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_mediatek_disable() argument 140 value &= ~BIT(pwm->hwpwm); in pwm_mediatek_disable() 144 static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_mediatek_config() argument 216 pwm_mediatek_apply(struct pwm_chip * chip,struct pwm_device * pwm,const struct pwm_state * state) pwm_mediatek_apply() argument [all...] |
/linux/drivers/clocksource/ |
H A 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 in samsung_time_setup() [all...] |
/linux/Documentation/devicetree/bindings/pwm/ |
H A 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 [all...] |
H A D | pwm-hibvt.txt | 6 "hisilicon,hi3516cv300-pwm" 7 "hisilicon,hi3519v100-pwm" 8 "hisilicon,hi3559v100-shub-pwm" 9 "hisilicon,hi3559v100-pwm 13 - #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of 17 pwm: pwm@12130000 { 18 compatible = "hisilicon,hi3516cv300-pwm"; 22 #pwm [all...] |
H A D | img-pwm.txt | 4 - compatible: Should be "img,pistachio-pwm" 5 - reg: Should contain physical base address and length of pwm registers. 9 - pwm: PWM operating clock. 11 - #pwm-cells: Should be 2. See pwm.yaml in this directory for the 17 pwm: pwm@18101300 { 18 compatible = "img,pistachio-pwm"; 21 clock-names = "pwm", "sys"; 22 #pwm [all...] |
/linux/drivers/input/keyboard/ |
H A D | lm8323.c | 127 /* pwm lock */ 148 struct lm8323_pwm pwm[LM8323_NUM_PWMS]; member 352 static void pwm_done(struct lm8323_pwm *pwm) in pwm_done() argument 354 guard(mutex)(&pwm->lock); in pwm_done() 356 pwm->running = false; in pwm_done() 357 if (pwm->desired_brightness != pwm->brightness) in pwm_done() 358 schedule_work(&pwm->work); in pwm_done() 392 "pwm%d engine completed\n", i); in lm8323_irq() 393 pwm_done(&lm->pwm[ in lm8323_irq() 415 lm8323_write_pwm_one(struct lm8323_pwm * pwm,int pos,u16 cmd) lm8323_write_pwm_one() argument 427 lm8323_write_pwm(struct lm8323_pwm * pwm,int kill,int len,const u16 * cmds) lm8323_write_pwm() argument 442 struct lm8323_pwm *pwm = work_to_pwm(work); lm8323_pwm_work() local 496 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); lm8323_pwm_set_brightness() local 522 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); lm8323_pwm_show_time() local 531 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); lm8323_pwm_store_time() local 554 struct lm8323_pwm *pwm; init_pwm() local 626 int pwm; lm8323_probe() local [all...] |
/linux/arch/loongarch/boot/dts/ |
H A D | loongson-2k0500.dtsi | 172 pwm@1ff5c000 { 173 compatible = "loongson,ls2k0500-pwm", "loongson,ls7a-pwm"; 178 #pwm-cells = <3>; 182 pwm@1ff5c010 { 183 compatible = "loongson,ls2k0500-pwm", "loongson,ls7a-pwm"; 188 #pwm-cells = <3>; 192 pwm@1ff5c020 { 193 compatible = "loongson,ls2k0500-pwm", "loongso [all...] |
/linux/arch/riscv/boot/dts/spacemit/ |
H A D | k1.dtsi | 390 pwm0: pwm@d401a000 { 391 compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm"; 393 #pwm-cells = <3>; 399 pwm1: pwm@d401a400 { 400 compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm"; 402 #pwm-cells = <3>; 408 pwm2: pwm@d401a800 { 409 compatible = "spacemit,k1-pwm", "marvel [all...] |
/linux/drivers/hwmon/ |
H A D | mlxreg-fan.c | 100 * @pwm: PWM data; 110 struct mlxreg_fan_pwm pwm[MLXREG_FAN_MAX_PWM]; member 125 struct mlxreg_fan_pwm *pwm; in mlxreg_fan_read() local 182 pwm = &fan->pwm[channel]; in mlxreg_fan_read() 185 err = regmap_read(fan->regmap, pwm->reg, ®val); in mlxreg_fan_read() 209 struct mlxreg_fan_pwm *pwm; in mlxreg_fan_write() local 218 pwm = &fan->pwm[channel]; in mlxreg_fan_write() 221 pwm in mlxreg_fan_write() 344 struct mlxreg_fan_pwm *pwm = cdev->devdata; mlxreg_fan_get_cur_state() local 364 struct mlxreg_fan_pwm *pwm = cdev->devdata; mlxreg_fan_set_cur_state() local 559 struct mlxreg_fan_pwm *pwm = &fan->pwm[i]; mlxreg_fan_cooling_config() local [all...] |
/linux/arch/arm64/boot/dts/amlogic/ |
H A D | amlogic-c3.dtsi | 414 pwm_a_pins1: pwm-a-pins1 { 421 pwm_b_pins1: pwm-b-pins1 { 428 pwm_c_pins1: pwm-c-pins1 { 435 pwm_d_pins1: pwm-d-pins1 { 442 pwm_e_pins1: pwm-e-pins1 { 449 pwm_f_pins1: pwm-f-pins1 { 456 pwm_g_pins1: pwm-g-pins1 { 463 pwm_g_pins2: pwm-g-pins2 { 470 pwm_g_pins3: pwm-g-pins3 { 477 pwm_g_pins4: pwm [all...] |
/linux/drivers/clk/ |
H A D | clk-pwm.c | 12 #include <linux/pwm.h> 16 struct pwm_device *pwm; member 30 return pwm_apply_atomic(clk_pwm->pwm, &clk_pwm->state); in clk_pwm_enable() 40 pwm_apply_atomic(clk_pwm->pwm, &state); in clk_pwm_disable() 47 return pwm_apply_might_sleep(clk_pwm->pwm, &clk_pwm->state); in clk_pwm_prepare() 54 pwm_disable(clk_pwm->pwm); in clk_pwm_unprepare() 71 ret = pwm_get_state_hw(clk_pwm->pwm, &state); in clk_pwm_get_duty_cycle() 100 struct pwm_device *pwm; in clk_pwm_probe() local 109 pwm = devm_pwm_get(&pdev->dev, NULL); in clk_pwm_probe() 110 if (IS_ERR(pwm)) in clk_pwm_probe() [all...] |
/linux/arch/arm/boot/dts/microchip/ |
H A D | at91-kizbox.dts | 10 #include <dt-bindings/pwm/pwm.h> 50 compatible = "pwm-leds"; 53 label = "pwm:green:network"; 60 label = "pwm:red:network"; 67 label = "pwm:green:user"; 74 label = "pwm:red:user"; 95 tcb1_pwm0: pwm@0 { 96 compatible = "atmel,tcb-pwm"; 98 #pwm [all...] |