Lines Matching full:timebase
43 * PWM period is specified with a timebase register,
45 * specified in step periods, in the [0, $timebase] range.
46 * In other words, the timebase imposes the duty cycle
47 * resolution. Therefore, let's constraint the timebase to
49 * Imposing a minimum timebase, will impose a maximum PWM frequency.
94 u32 val, div, duty, timebase; in img_pwm_config() local
112 timebase = DIV_ROUND_UP(mul, 1); in img_pwm_config()
115 timebase = DIV_ROUND_UP(mul, 8); in img_pwm_config()
118 timebase = DIV_ROUND_UP(mul, 64); in img_pwm_config()
121 timebase = DIV_ROUND_UP(mul, 512); in img_pwm_config()
124 "failed to configure timebase steps/divider value\n"); in img_pwm_config()
128 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
141 (timebase << PWM_CH_CFG_TMBASE_SHIFT); in img_pwm_config()