Lines Matching defs:pwm
14 #include <linux/pwm.h>
50 static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
108 static int ecap_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
132 static int ecap_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
151 static void ecap_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
168 static int ecap_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
172 int enabled = pwm->state.enabled;
174 if (state->polarity != pwm->state.polarity) {
177 ecap_pwm_disable(chip, pwm);
181 err = ecap_pwm_set_polarity(chip, pwm, state->polarity);
188 ecap_pwm_disable(chip, pwm);
195 err = ecap_pwm_config(chip, pwm, state->duty_cycle,
201 return ecap_pwm_enable(chip, pwm);
293 struct pwm_device *pwm = pc->chip.pwms;
298 if (pwm_is_enabled(pwm))
307 struct pwm_device *pwm = pc->chip.pwms;
310 if (pwm_is_enabled(pwm))