Lines Matching defs:state
70 struct pwm_state *state)
92 state->enabled = true;
94 state->enabled = false;
107 state->period = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
112 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
113 state->polarity = PWM_POLARITY_NORMAL;
115 /* Disable PWM clocks if the PWM channel is not in enable state. */
116 if (!state->enabled)
163 const struct pwm_state *state)
168 struct pwm_state *cstate = &pwm->state;
171 if (state->polarity != PWM_POLARITY_NORMAL)
174 if (state->enabled) {
190 ret = sprd_pwm_config(spc, pwm, state->duty_cycle,
191 state->period);