Lines Matching refs:state
109 struct pwm_state *state)
116 state->enabled = duty > 0;
120 state->enabled = false;
122 state->period = ddata->real_period;
123 state->duty_cycle =
125 state->polarity = PWM_POLARITY_INVERSED;
148 const struct pwm_state *state)
158 if (state->polarity != PWM_POLARITY_INVERSED)
167 cur_state = pwm->state;
170 duty_cycle = state->duty_cycle;
171 if (!state->enabled)
181 frac = DIV64_U64_ROUND_CLOSEST(num, state->period);
186 if (state->period != ddata->approx_period) {
198 ddata->approx_period = state->period;
205 if (state->enabled != enabled)
206 pwm_sifive_enable(chip, state->enabled);
345 if (pwm->state.enabled)