rtc: hym8563: return clock rate even when clock is disabled

A patch from »rtc: hym8563: return clock rate even when clock is disabled« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Tue, 17 Feb 2015 23:18:40 +0100

Commit-Message

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@...>

Patch-Comment

drivers/rtc/rtc-hym8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Statistics

  • 1 lines added
  • 1 lines removed

Changes

-------------------------- drivers/rtc/rtc-hym8563.c ---------------------------
index b936bb4..d4a6561 100644
@@ -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;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...