Lines Matching defs:state
57 const struct pwm_state *state)
63 if (state->polarity != pwm->state.polarity)
66 if (!state->enabled) {
89 * With clk_rate limited above we have dd_freq <= state->period,
92 dd_freq = mul_u64_u64_div_u64(clk_rate, state->period, (u64)SP7021_PWM_FREQ_SCALER
108 if (state->duty_cycle == state->period) {
117 duty = mul_u64_u64_div_u64(state->duty_cycle, clk_rate,
129 struct pwm_state *state)
146 state->period = DIV64_U64_ROUND_UP((u64)dd_freq * (u64)SP7021_PWM_FREQ_SCALER
151 state->duty_cycle = DIV64_U64_ROUND_UP((u64)dd_freq * (u64)duty * NSEC_PER_SEC,
153 state->enabled = true;
155 state->enabled = false;
158 state->polarity = PWM_POLARITY_NORMAL;