Skip to content

Commit 1e15a68

Browse files
TroyMitchell911alexandrebelloni
authored andcommitted
rtc: pcf8563: fix wrong alarm register
When the regmap framework was introduced to this driver, the PCF8563_REG_AMN register within the set_alarm function was incorrectly changed to PCF8563_REG_SC. The PCF8563_REG_SC register is the seconds register. This caused alarm values to be written to the seconds register when an alarm was set. Which means the alarm would not trigger as expected and the seconds register would be overwritten with an incorrect value. Signed-off-by: Troy Mitchell <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent f096bdb commit 1e15a68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-pcf8563.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm)
285285
buf[2] = bin2bcd(tm->time.tm_mday);
286286
buf[3] = tm->time.tm_wday & 0x07;
287287

288-
err = regmap_bulk_write(pcf8563->regmap, PCF8563_REG_SC, buf,
288+
err = regmap_bulk_write(pcf8563->regmap, PCF8563_REG_AMN, buf,
289289
sizeof(buf));
290290
if (err)
291291
return err;

0 commit comments

Comments
 (0)