Lines Matching refs:clk_rate
51 static u32 pwm_omap_dmtimer_get_clock_cycles(unsigned long clk_rate, int ns) in pwm_omap_dmtimer_get_clock_cycles() argument
53 return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC); in pwm_omap_dmtimer_get_clock_cycles()
103 unsigned long clk_rate; in pwm_omap_dmtimer_config() local
123 clk_rate = clk_get_rate(fclk); in pwm_omap_dmtimer_config()
124 if (!clk_rate) { in pwm_omap_dmtimer_config()
129 dev_dbg(chip->dev, "clk rate: %luHz\n", clk_rate); in pwm_omap_dmtimer_config()
147 period_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, period_ns); in pwm_omap_dmtimer_config()
148 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config()
153 period_ns, clk_rate); in pwm_omap_dmtimer_config()
160 duty_ns, clk_rate); in pwm_omap_dmtimer_config()
166 duty_ns, period_ns, clk_rate); in pwm_omap_dmtimer_config()
173 clk_rate), in pwm_omap_dmtimer_config()
175 clk_rate)); in pwm_omap_dmtimer_config()