rtc: pcf85063: fix pcf85063_clkout_control

[ Upstream commit c2d12e8533 ]

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

Reported-by: Janne Terho <janne.terho@ouman.fi>
Fixes: 8c229ab604 ("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>
This commit is contained in:
Alexandre Belloni 2022-12-11 23:35:53 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 35a174552b
Коммит f8f1d037d6
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -422,7 +422,7 @@ static int pcf85063_clkout_control(struct clk_hw *hw, bool enable)
unsigned int buf; unsigned int buf;
int ret; int ret;
ret = regmap_read(pcf85063->regmap, PCF85063_REG_OFFSET, &buf); ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf);
if (ret < 0) if (ret < 0)
return ret; return ret;
buf &= PCF85063_REG_CLKO_F_MASK; buf &= PCF85063_REG_CLKO_F_MASK;