Lines Matching defs:state
96 struct pwm_state *state)
104 state->enabled = reg & SL28CPLD_PWM_CTRL_ENABLE;
107 state->period = SL28CPLD_PWM_PERIOD(prescaler);
110 state->duty_cycle = SL28CPLD_PWM_TO_DUTY_CYCLE(reg);
111 state->polarity = PWM_POLARITY_NORMAL;
121 state->duty_cycle = min(state->duty_cycle, state->period);
127 const struct pwm_state *state)
136 if (state->polarity != PWM_POLARITY_NORMAL)
143 prescaler = DIV_ROUND_UP_ULL(SL28CPLD_PWM_PERIOD(0), state->period);
150 if (state->enabled)
153 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle);
179 write_duty_cycle_first = pwm->state.period > state->period;