Lines Matching defs:state
92 struct pwm_state *state)
100 state->enabled = reg & SL28CPLD_PWM_CTRL_ENABLE;
103 state->period = SL28CPLD_PWM_PERIOD(prescaler);
106 state->duty_cycle = SL28CPLD_PWM_TO_DUTY_CYCLE(reg);
107 state->polarity = PWM_POLARITY_NORMAL;
117 state->duty_cycle = min(state->duty_cycle, state->period);
121 const struct pwm_state *state)
130 if (state->polarity != PWM_POLARITY_NORMAL)
137 prescaler = DIV_ROUND_UP_ULL(SL28CPLD_PWM_PERIOD(0), state->period);
144 if (state->enabled)
147 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle);
173 write_duty_cycle_first = pwm->state.period > state->period;