Lines Matching defs:state
62 struct pwm_state *state)
83 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
87 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
90 state->enabled = (val & enable_conf) == enable_conf;
93 state->polarity = PWM_POLARITY_INVERSED;
95 state->polarity = PWM_POLARITY_NORMAL;
104 const struct pwm_state *state)
118 div = clk_rate * state->period;
122 div = clk_rate * state->duty_cycle;
140 if (state->polarity == PWM_POLARITY_INVERSED)
188 const struct pwm_state *state)
206 if (state->polarity != curstate.polarity && enabled &&
214 rockchip_pwm_config(chip, pwm, state);
215 if (state->enabled != enabled) {
216 ret = rockchip_pwm_enable(chip, pwm, state->enabled);