Lines Matching refs:state
69 struct pwm_state *state)
91 state->enabled = true;
93 state->enabled = false;
106 state->period = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
111 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
112 state->polarity = PWM_POLARITY_NORMAL;
114 /* Disable PWM clocks if the PWM channel is not in enable state. */
115 if (!state->enabled)
160 const struct pwm_state *state)
165 struct pwm_state *cstate = &pwm->state;
168 if (state->enabled) {
184 ret = sprd_pwm_config(spc, pwm, state->duty_cycle,
185 state->period);