Lines Matching defs:pwm
13 #include <linux/pwm.h>
101 static int kona_pwmc_config(struct pwm_chip *chip, struct pwm_device *pwm,
107 unsigned int value, chan = pwm->hwpwm;
157 static int kona_pwmc_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
161 unsigned int chan = pwm->hwpwm;
189 static int kona_pwmc_enable(struct pwm_chip *chip, struct pwm_device *pwm)
203 static void kona_pwmc_disable(struct pwm_chip *chip, struct pwm_device *pwm)
206 unsigned int chan = pwm->hwpwm;
225 static int kona_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
230 bool enabled = pwm->state.enabled;
232 if (state->polarity != pwm->state.polarity) {
234 kona_pwmc_disable(chip, pwm);
238 err = kona_pwmc_set_polarity(chip, pwm, state->polarity);
242 pwm->state.polarity = state->polarity;
247 kona_pwmc_disable(chip, pwm);
258 err = kona_pwmc_enable(chip, pwm);
263 err = kona_pwmc_config(pwm->chip, pwm, state->duty_cycle, state->period);
264 if (err && !pwm->state.enabled)
323 { .compatible = "brcm,kona-pwm" },
330 .name = "bcm-kona-pwm",