* [PATCH] rtc: pcf8563: fix output clock rate
@ 2017-11-07 12:12 Philipp Zabel
2017-11-08 3:47 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2017-11-07 12:12 UTC (permalink / raw)
To: linux-rtc
Cc: Alessandro Zummo, Alexandre Belloni, linux-kernel, kernel, Philipp Zabel
The pcf8563_clkout_recalc_rate function erroneously ignores the
frequency index read from the CLKO register and always returns
32768 Hz.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/rtc/rtc-pcf8563.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index cea6ea4df970f..8c836c51a508f 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -419,13 +419,13 @@ static unsigned long pcf8563_clkout_recalc_rate(struct clk_hw *hw,
int ret = pcf8563_read_block_data(client, PCF8563_REG_CLKO, 1, &buf);
if (ret < 0)
return 0;
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,
unsigned long *prate)
{
int i;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: pcf8563: fix output clock rate
2017-11-07 12:12 [PATCH] rtc: pcf8563: fix output clock rate Philipp Zabel
@ 2017-11-08 3:47 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2017-11-08 3:47 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-rtc, Alessandro Zummo, linux-kernel, kernel
On 07/11/2017 at 13:12:17 +0100, Philipp Zabel wrote:
> The pcf8563_clkout_recalc_rate function erroneously ignores the
> frequency index read from the CLKO register and always returns
> 32768 Hz.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> drivers/rtc/rtc-pcf8563.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 12:12 [PATCH] rtc: pcf8563: fix output clock rate Philipp Zabel
2017-11-08 3:47 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).