Lines Matching defs:state
16 * - When atmel_pwm_apply() is called with state->enabled=false a change in
17 * state->polarity isn't honored.
194 const struct pwm_state *state,
198 unsigned long long cycles = state->period;
227 static void atmel_pwm_calculate_cdty(const struct pwm_state *state,
231 unsigned long long cycles = state->duty_cycle;
294 const struct pwm_state *state)
304 if (state->enabled) {
308 cstate.polarity == state->polarity &&
309 cstate.period == state->period) {
316 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty);
321 ret = atmel_pwm_calculate_cprd_and_pres(chip, clkrate, state, &cprd,
329 atmel_pwm_calculate_cdty(state, clkrate, cprd, pres, &cdty);
344 if (state->polarity == PWM_POLARITY_NORMAL)
359 struct pwm_state *state)
378 state->period = DIV64_U64_ROUND_UP(tmp, rate);
387 state->duty_cycle = DIV64_U64_ROUND_UP(tmp, rate);
389 state->enabled = true;
391 state->enabled = false;
395 state->polarity = PWM_POLARITY_INVERSED;
397 state->polarity = PWM_POLARITY_NORMAL;