* [PATCH] rtc: hym8563: return clock rate even when clock is disabled
@ 2015-03-06 9:52 Heiko Stuebner
0 siblings, 0 replies; only message in thread
From: Heiko Stuebner @ 2015-03-06 9:52 UTC (permalink / raw)
To: akpm, Alessandro Zummo; +Cc: rtc-linux, linux-kernel
When the clock is disabled, do not return a rate of 0 but instead return
the rate the clock will be running at after it gets enabled. This prevents
problems when the core clock code is trying to determine a suitable rate,
while the clock is still off.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/rtc/rtc-hym8563.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index b936bb4..d4a6561 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -309,7 +309,7 @@ static unsigned long hym8563_clkout_recalc_rate(struct clk_hw *hw,
struct i2c_client *client = hym8563->client;
int ret = i2c_smbus_read_byte_data(client, HYM8563_CLKOUT);
- if (ret < 0 || ret & HYM8563_CLKOUT_DISABLE)
+ if (ret < 0)
return 0;
ret &= HYM8563_CLKOUT_MASK;
--
2.1.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-06 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06 9:52 [PATCH] rtc: hym8563: return clock rate even when clock is disabled Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox