Home
last modified time | relevance | path

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

/openbmc/linux/drivers/pwm/
H A Dpwm-lpss.c128 unsigned long c = lpwm->info->clk_rate, base_unit_range; in pwm_lpss_prepare() local
138 base_unit_range = BIT(lpwm->info->base_unit_bits); in pwm_lpss_prepare()
139 freq *= base_unit_range; in pwm_lpss_prepare()
143 base_unit = clamp_val(base_unit, 1, base_unit_range - 1); in pwm_lpss_prepare()
151 ctrl &= ~((base_unit_range - 1) << PWM_BASE_UNIT_SHIFT); in pwm_lpss_prepare()
212 unsigned long base_unit_range; in pwm_lpss_get_state() local
218 base_unit_range = BIT(lpwm->info->base_unit_bits); in pwm_lpss_get_state()
222 base_unit = (ctrl >> PWM_BASE_UNIT_SHIFT) & (base_unit_range - 1); in pwm_lpss_get_state()
225 do_div(freq, base_unit_range); in pwm_lpss_get_state()