Lines Matching defs:duty
16 * - The period and duty cycle can't be changed together in one atomic action.
45 * The time base used in the EC is 8MHz, or 125ns. Period and duty cycle are
58 int period, int duty)
63 * Changes to the period and duty cycle take effect as soon as the
66 * duty cycle is fully written. If, in such a case, the old duty cycle
69 * To minimize the time between the changes to period and duty cycle
75 { NTXEC_REG_DUTY_HIGH, ntxec_reg8(duty >> 8) },
77 { NTXEC_REG_DUTY_LOW, ntxec_reg8(duty) },
87 unsigned int period, duty;
94 duty = min_t(u64, state->duty_cycle, period);
97 duty /= TIME_BASE_NS;
100 * Writing a duty cycle of zero puts the device into a state where
101 * writing a higher duty cycle doesn't result in the brightness that it
104 * As a workaround, write ENABLE=0 when the duty cycle is zero.
105 * The case that something has previously set the duty cycle to zero
108 if (state->enabled && duty != 0) {
109 res = ntxec_pwm_set_raw_period_and_duty_cycle(chip, period, duty);