Lines Matching defs:state
82 * This function determines for a given pwm_state *state that a consumer
90 const struct pwm_state *state)
97 tmp = (u64)state->period * rate;
121 if (!state->enabled)
124 real_state->duty_cycle = state->duty_cycle;
129 real_state->polarity = state->polarity;
130 real_state->enabled = state->enabled;
137 struct pwm_state *state)
144 state->period = tpm->real_period;
152 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate);
157 state->polarity = PWM_POLARITY_INVERSED;
163 state->polarity = PWM_POLARITY_NORMAL;
166 state->enabled = FIELD_GET(PWM_IMX_TPM_CnSC_ELS, val) ? true : false;
174 struct pwm_state *state,
184 if (state->period != tpm->real_period) {
214 tpm->real_period = state->period;
221 if (c.enabled && c.polarity != state->polarity)
224 if (state->duty_cycle != c.duty_cycle) {
259 if (state->enabled) {
268 val |= (state->polarity == PWM_POLARITY_NORMAL) ?
275 if (state->enabled != c.enabled) {
277 if (state->enabled) {
292 const struct pwm_state *state)
299 ret = pwm_imx_tpm_round_state(chip, ¶m, &real_state, state);