Lines Matching defs:state
132 struct pwm_state *state)
142 state->period = div_u64(value * 1000, freq);
145 state->duty_cycle = div_u64(value * 1000, freq);
148 state->enabled = (PWM_ENABLE_MASK & value);
149 state->polarity = (PWM_POLARITY_MASK & value) ? PWM_POLARITY_INVERSED : PWM_POLARITY_NORMAL;
155 const struct pwm_state *state)
159 if (state->polarity != pwm->state.polarity)
160 hibvt_pwm_set_polarity(chip, pwm, state->polarity);
162 if (state->period != pwm->state.period ||
163 state->duty_cycle != pwm->state.duty_cycle) {
164 hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period);
170 if (hi_pwm_chip->soc->quirk_force_enable && state->enabled)
174 if (state->enabled != pwm->state.enabled) {
175 if (state->enabled)