Lines Matching defs:pwm

41 #include <linux/pwm.h>
120 static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
123 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
137 static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
140 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
145 static int meson_pwm_calc(struct pwm_chip *chip, struct pwm_device *pwm,
149 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
207 static void meson_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
210 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
216 channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];
235 static void meson_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
244 value &= ~meson_pwm_per_channel_data[pwm->hwpwm].pwm_en_mask;
250 static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
254 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
275 meson_pwm_enable(chip, pwm);
277 meson_pwm_disable(chip, pwm);
280 err = meson_pwm_calc(chip, pwm, state);
284 meson_pwm_enable(chip, pwm);
290 static u64 meson_pwm_cnt_to_ns(struct pwm_chip *chip, struct pwm_device *pwm,
298 channel = &meson->channels[pwm->hwpwm];
307 static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
315 channel = &meson->channels[pwm->hwpwm];
316 channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];
325 state->period = meson_pwm_cnt_to_ns(chip, pwm, channel->lo + channel->hi);
326 state->duty_cycle = meson_pwm_cnt_to_ns(chip, pwm, channel->hi);
503 .compatible = "amlogic,meson8-pwm-v2",
508 .compatible = "amlogic,meson8b-pwm",
512 .compatible = "amlogic,meson-gxbb-pwm",
516 .compatible = "amlogic,meson-gxbb-ao-pwm",
520 .compatible = "amlogic,meson-axg-ee-pwm",
524 .compatible = "amlogic,meson-axg-ao-pwm",
528 .compatible = "amlogic,meson-g12a-ee-pwm",
532 .compatible = "amlogic,meson-g12a-ao-pwm-ab",
536 .compatible = "amlogic,meson-g12a-ao-pwm-cd",
577 .name = "meson-pwm",