Lines Matching refs:pwm
68 static inline u32 pwm_lpss_read(const struct pwm_device *pwm) in pwm_lpss_read() argument
70 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_read()
72 return readl(lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_read()
75 static inline void pwm_lpss_write(const struct pwm_device *pwm, u32 value) in pwm_lpss_write() argument
77 struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); in pwm_lpss_write()
79 writel(value, lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); in pwm_lpss_write()
82 static int pwm_lpss_config(struct pwm_chip *chip, struct pwm_device *pwm, in pwm_lpss_config() argument
111 ctrl = pwm_lpss_read(pwm); in pwm_lpss_config()
117 pwm_lpss_write(pwm, ctrl); in pwm_lpss_config()
124 static int pwm_lpss_enable(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_lpss_enable() argument
127 pwm_lpss_write(pwm, pwm_lpss_read(pwm) | PWM_ENABLE); in pwm_lpss_enable()
131 static void pwm_lpss_disable(struct pwm_chip *chip, struct pwm_device *pwm) in pwm_lpss_disable() argument
133 pwm_lpss_write(pwm, pwm_lpss_read(pwm) & ~PWM_ENABLE); in pwm_lpss_disable()