Lines Matching full:stmpe

11 #include <linux/mfd/stmpe.h>
29 struct stmpe *stmpe; member
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()
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()
88 /* STMPE 24xx PWM instructions */
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()
164 if (stmpe_pwm->stmpe->partnum == STMPE2401) in stmpe_24xx_pwm_config()
167 if (stmpe_pwm->stmpe->partnum == STMPE2403) 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()
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()
271 struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent); in stmpe_pwm_probe() local
279 pwm->stmpe = stmpe; in stmpe_pwm_probe()
283 if (stmpe->partnum == STMPE2401 || stmpe->partnum == STMPE2403) { in stmpe_pwm_probe()
287 if (stmpe->partnum == STMPE1601) in stmpe_pwm_probe()
290 dev_err(&pdev->dev, "Unknown STMPE PWM\n"); in stmpe_pwm_probe()
295 ret = stmpe_enable(stmpe, STMPE_BLOCK_PWM); in stmpe_pwm_probe()
301 stmpe_disable(stmpe, STMPE_BLOCK_PWM); in stmpe_pwm_probe()
312 .name = "stmpe-pwm",