Lines Matching defs:state
16 * - When atmel_pwm_apply() is called with state->enabled=false a change in
17 * state->polarity isn't honored.
127 const struct pwm_state *state,
131 unsigned long long cycles = state->period;
160 static void atmel_pwm_calculate_cdty(const struct pwm_state *state,
163 unsigned long long cycles = state->duty_cycle;
166 do_div(cycles, state->period);
236 const struct pwm_state *state)
246 if (state->enabled) {
248 cstate.polarity == state->polarity &&
249 cstate.period == state->period) {
252 atmel_pwm_calculate_cdty(state, cprd, &cdty);
257 ret = atmel_pwm_calculate_cprd_and_pres(chip, state, &cprd,
265 atmel_pwm_calculate_cdty(state, cprd, &cdty);
280 if (state->polarity == PWM_POLARITY_NORMAL)
299 struct pwm_state *state)
318 state->period = DIV64_U64_ROUND_UP(tmp, rate);
324 state->duty_cycle = DIV64_U64_ROUND_UP(tmp, rate);
326 state->enabled = true;
328 state->enabled = false;
332 state->polarity = PWM_POLARITY_INVERSED;
334 state->polarity = PWM_POLARITY_NORMAL;