提交 b3288a43 编写于 作者: H Heiko Stuebner 提交者: Linus Torvalds

drivers/rtc/rtc-hym8563.c: return clock rate even when clock is disabled

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: NHeiko Stuebner <heiko@sntech.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d174a024
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册