Searched refs:base_unit (Results 1 - 2 of 2) sorted by relevance
| /kernel/linux/linux-5.10/drivers/pwm/ |
| H A D | pwm-lpss.c | 87 unsigned long long base_unit, freq = NSEC_PER_SEC; in pwm_lpss_prepare() local 94 * base_unit = round(base_unit_range * freq / c) in pwm_lpss_prepare() 99 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c); in pwm_lpss_prepare() 100 /* base_unit must not be 0 and we also want to avoid overflowing it */ in pwm_lpss_prepare() 101 base_unit = clamp_val(base_unit, 1, base_unit_range - 1); in pwm_lpss_prepare() 110 ctrl |= (u32) base_unit << PWM_BASE_UNIT_SHIFT; in pwm_lpss_prepare() 171 unsigned long long base_unit, freq, on_time_div; in pwm_lpss_get_state() local 180 base_unit = (ctrl >> PWM_BASE_UNIT_SHIFT) & (base_unit_range - 1); in pwm_lpss_get_state() 182 freq = base_unit * lpw in pwm_lpss_get_state() [all...] |
| /kernel/linux/linux-6.6/drivers/pwm/ |
| H A D | pwm-lpss.c | 129 unsigned long long base_unit, freq = NSEC_PER_SEC; in pwm_lpss_prepare() local 136 * base_unit = round(base_unit_range * freq / c) in pwm_lpss_prepare() 141 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c); in pwm_lpss_prepare() 142 /* base_unit must not be 0 and we also want to avoid overflowing it */ in pwm_lpss_prepare() 143 base_unit = clamp_val(base_unit, 1, base_unit_range - 1); in pwm_lpss_prepare() 152 ctrl |= (u32) base_unit << PWM_BASE_UNIT_SHIFT; in pwm_lpss_prepare() 213 unsigned long long base_unit, freq, on_time_div; in pwm_lpss_get_state() local 222 base_unit = (ctrl >> PWM_BASE_UNIT_SHIFT) & (base_unit_range - 1); in pwm_lpss_get_state() 224 freq = base_unit * lpw in pwm_lpss_get_state() [all...] |
Completed in 2 milliseconds