Home
last modified time | relevance | path

Searched refs:ADP5585_PWM_OSC_FREQ_HZ (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/pwm/
H A Dpwm-adp5585.c31 #define ADP5585_PWM_OSC_FREQ_HZ 1000000U macro
32 #define ADP5585_PWM_MIN_PERIOD_NS (2ULL * NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ)
33 #define ADP5585_PWM_MAX_PERIOD_NS (2ULL * 0xffff * NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ)
83 on = div_u64(duty_cycle, NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ); in pwm_adp5585_apply()
84 off = div_u64(period, NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ) - on; in pwm_adp5585_apply()
130 state->duty_cycle = on * (NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ); in pwm_adp5585_get_state()
131 state->period = (on + off) * (NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ); in pwm_adp5585_get_state()