Skip to content

Commit

Permalink
rtc: pcf85063: fix pcf85063_clkout_control
Browse files Browse the repository at this point in the history
[ Upstream commit c2d12e8 ]

pcf85063_clkout_control reads the wrong register but then update the
correct one.

Reported-by: Janne Terho <janne.terho@ouman.fi>
Fixes: 8c229ab ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
Link: https://lore.kernel.org/r/20221211223553.59955-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
alexandrebelloni authored and gregkh committed Dec 31, 2022
1 parent 35a1745 commit f8f1d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-pcf85063.c
Expand Up @@ -422,7 +422,7 @@ static int pcf85063_clkout_control(struct clk_hw *hw, bool enable)
unsigned int buf;
int ret;

ret = regmap_read(pcf85063->regmap, PCF85063_REG_OFFSET, &buf);
ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf);
if (ret < 0)
return ret;
buf &= PCF85063_REG_CLKO_F_MASK;
Expand Down

0 comments on commit f8f1d03

Please sign in to comment.