Lines Matching refs:state
62 struct pwm_state *state)
79 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
83 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
86 state->enabled = (val & enable_conf) == enable_conf;
89 state->polarity = PWM_POLARITY_INVERSED;
91 state->polarity = PWM_POLARITY_NORMAL;
97 const struct pwm_state *state)
111 div = clk_rate * state->period;
115 div = clk_rate * state->duty_cycle;
133 if (state->polarity == PWM_POLARITY_INVERSED)
181 const struct pwm_state *state)
195 if (state->polarity != curstate.polarity && enabled &&
203 rockchip_pwm_config(chip, pwm, state);
204 if (state->enabled != enabled) {
205 ret = rockchip_pwm_enable(chip, pwm, state->enabled);