Lines Matching defs:pwm

33 #include <linux/pwm.h>
40 * struct rz_mtu3_channel_io_map - MTU3 pwm channel map
51 * struct rz_mtu3_pwm_channel - MTU3 pwm channel data
54 * @map: MTU3 pwm channel map
62 * struct rz_mtu3_pwm_chip - MTU3 pwm private data
64 * @chip: MTU3 pwm chip data
71 * @channel_data: MTU3 pwm channel data
167 static int rz_mtu3_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
174 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
197 static void rz_mtu3_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
203 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
215 struct pwm_device *pwm)
226 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
231 if (priv->map->base_pwm_number == pwm->hwpwm)
247 struct pwm_device *pwm)
252 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
256 if (priv->map->base_pwm_number == pwm->hwpwm)
271 static int rz_mtu3_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
281 state->enabled = rz_mtu3_pwm_is_ch_enabled(rz_mtu3_pwm, pwm->hwpwm);
288 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
289 if (priv->map->base_pwm_number == pwm->hwpwm)
320 static int rz_mtu3_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
332 priv = rz_mtu3_get_channel(rz_mtu3_pwm, pwm->hwpwm);
362 if (!pwm->state.enabled) {
376 if (priv->map->base_pwm_number == pwm->hwpwm) {
401 if (!pwm->state.enabled)
407 static int rz_mtu3_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
411 bool enabled = pwm->state.enabled;
419 rz_mtu3_pwm_disable(rz_mtu3_pwm, pwm);
425 ret = rz_mtu3_pwm_config(chip, pwm, state);
431 ret = rz_mtu3_pwm_enable(rz_mtu3_pwm, pwm);
541 .name = "pwm-rz-mtu3",
549 MODULE_ALIAS("platform:pwm-rz-mtu3");