Lines Matching defs:state
87 struct pwm_state *state)
91 state->period = RPI_PWM_PERIOD_NS;
92 state->duty_cycle = DIV_ROUND_UP(rpipwm->duty_cycle * RPI_PWM_PERIOD_NS,
94 state->enabled = !!(rpipwm->duty_cycle);
95 state->polarity = PWM_POLARITY_NORMAL;
101 const struct pwm_state *state)
107 if (state->period < RPI_PWM_PERIOD_NS ||
108 state->polarity != PWM_POLARITY_NORMAL)
111 if (!state->enabled)
113 else if (state->duty_cycle < RPI_PWM_PERIOD_NS)
114 duty_cycle = DIV_ROUND_DOWN_ULL(state->duty_cycle * RPI_PWM_MAX_DUTY,