Lines Matching refs:stmpe_pwm

28 struct stmpe_pwm {  struct
34 static inline struct stmpe_pwm *to_stmpe_pwm(struct pwm_chip *chip) in to_stmpe_pwm() argument
36 return container_of(chip, struct stmpe_pwm, chip); in to_stmpe_pwm()
41 struct stmpe_pwm *stmpe_pwm = to_stmpe_pwm(chip); in stmpe_24xx_pwm_enable() local
45 ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); in stmpe_24xx_pwm_enable()
54 ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); in stmpe_24xx_pwm_enable()
67 struct stmpe_pwm *stmpe_pwm = to_stmpe_pwm(chip); in stmpe_24xx_pwm_disable() local
71 ret = stmpe_reg_read(stmpe_pwm->stmpe, STMPE24XX_PWMCS); in stmpe_24xx_pwm_disable()
80 ret = stmpe_reg_write(stmpe_pwm->stmpe, STMPE24XX_PWMCS, value); in stmpe_24xx_pwm_disable()
102 struct stmpe_pwm *stmpe_pwm = to_stmpe_pwm(chip); in stmpe_24xx_pwm_config() local
120 if (stmpe_pwm->stmpe->partnum == STMPE2401 || in stmpe_24xx_pwm_config()
121 stmpe_pwm->stmpe->partnum == STMPE2403) in stmpe_24xx_pwm_config()
124 ret = stmpe_set_altfunc(stmpe_pwm->stmpe, BIT(pin), in stmpe_24xx_pwm_config()
156 if (stmpe_pwm->stmpe->partnum == STMPE2401) in stmpe_24xx_pwm_config()
159 if (stmpe_pwm->stmpe->partnum == STMPE2403) in stmpe_24xx_pwm_config()
162 stmpe_pwm->last_duty = 0x00; in stmpe_24xx_pwm_config()
164 if (stmpe_pwm->stmpe->partnum == STMPE2401) in stmpe_24xx_pwm_config()
167 if (stmpe_pwm->stmpe->partnum == STMPE2403) in stmpe_24xx_pwm_config()
170 stmpe_pwm->last_duty = 0xff; in stmpe_24xx_pwm_config()
172 u8 value, last = stmpe_pwm->last_duty; in stmpe_24xx_pwm_config()
196 } else if (stmpe_pwm->stmpe->partnum == STMPE2403) { in stmpe_24xx_pwm_config()
200 } else if (stmpe_pwm->stmpe->partnum == STMPE2401) { in stmpe_24xx_pwm_config()
222 stmpe_pwm->last_duty = value; in stmpe_24xx_pwm_config()
233 ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value); in stmpe_24xx_pwm_config()
242 ret = stmpe_reg_write(stmpe_pwm->stmpe, offset, value); in stmpe_24xx_pwm_config()
272 struct stmpe_pwm *pwm; in stmpe_pwm_probe()