Lines Matching refs:pwmchan
97 struct meson_pwm_channel * const pwmchan = pwm->pwm_priv;
102 switch (pwmchan->mpc_index) {
168 struct meson_pwm_channel * const pwmchan = pwm->pwm_priv;
170 *conf = pwmchan->mpc_conf;
177 struct meson_pwm_channel * const pwmchan = pwm->pwm_priv;
216 switch (pwmchan->mpc_index) {
260 pwmchan->mpc_conf = *conf;
267 pwmchan->mpc_index ? "A" : "B",
282 struct meson_pwm_channel *pwmchan;
294 pwmchan = &sc->sc_pwmchan[index];
302 if (pwmchan->mpc_conf.polarity != polarity) {
303 pwmchan->mpc_conf.duty_cycle =
304 pwmchan->mpc_conf.period - pwmchan->mpc_conf.duty_cycle;
305 pwmchan->mpc_conf.polarity = polarity;
307 if (pwmchan->mpc_conf.period != period) {
308 if (pwmchan->mpc_conf.period == 0) {
309 pwmchan->mpc_conf.duty_cycle = 0;
311 pwmchan->mpc_conf.duty_cycle =
312 (uint64_t)pwmchan->mpc_conf.duty_cycle *
313 period / pwmchan->mpc_conf.period;
315 pwmchan->mpc_conf.period = period;
318 return &pwmchan->mpc_pwm;