Lines Matching defs:duty_cycle
52 * @duty_cycle: PWM duty cycle (in nanoseconds)
62 u64 duty_cycle;
129 return state.duty_cycle;
156 * Once the function returns, you can adjust the ->enabled and ->duty_cycle
159 * ->duty_cycle is initially set to zero to avoid cases where the current
160 * ->duty_cycle value exceed the pwm_args->period one, which would trigger
161 * an error if the user calls pwm_apply_might_sleep() without adjusting ->duty_cycle
177 state->duty_cycle = 0;
189 * For example if you want to get the duty_cycle expressed in percent, call:
200 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale,
207 * @duty_cycle: relative duty cycle value
208 * @scale: scale in which @duty_cycle is expressed
211 * in nanoseconds), and puts the result in state->duty_cycle.
219 * This functions returns -EINVAL if @duty_cycle and/or @scale are
220 * inconsistent (@scale == 0 or @duty_cycle > @scale).
223 pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
226 if (!scale || duty_cycle > scale)
229 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle *
239 * @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
243 unsigned int duty_cycle;
336 if (state.duty_cycle == duty_ns && state.period == period_ns)
339 state.duty_cycle = duty_ns;