提交 a3350f9c 编写于 作者: P Philipp Zabel 提交者: Alexandre Belloni

rtc: pcf8563: fix output clock rate

The pcf8563_clkout_recalc_rate function erroneously ignores the
frequency index read from the CLKO register and always returns
32768 Hz.

Fixes: a39a6405 ("rtc: pcf8563: add CLKOUT to common clock framework")
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 804a6cfe
...@@ -422,7 +422,7 @@ static unsigned long pcf8563_clkout_recalc_rate(struct clk_hw *hw, ...@@ -422,7 +422,7 @@ static unsigned long pcf8563_clkout_recalc_rate(struct clk_hw *hw,
return 0; return 0;
buf &= PCF8563_REG_CLKO_F_MASK; buf &= PCF8563_REG_CLKO_F_MASK;
return clkout_rates[ret]; return clkout_rates[buf];
} }
static long pcf8563_clkout_round_rate(struct clk_hw *hw, unsigned long rate, static long pcf8563_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册