Skip to contentSkip to conversation

rtc: pcf85063: fix pcf85063_clkout_control

PATCH New [email protected] 1 participant 1 message Dec 11, 2022 Real time clock (RTC)

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 rtc: pcf85063: fix pcf85063_clkout_control

From: Alexandre Belloni <[email protected]>

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

Fixes 8c229ab6048b ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
---
 drivers/rtc/rtc-pcf85063.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pcf85063.c +1 -1
index 99f9cc57c7b3..754e03984f98 100644
@@ -424,7 +424,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;
Signature · 1 line
2.38.1