The patch titled Subject: rtc: pcf8563: fix write of invalid bits to ST2 reg has been added to the -mm tree. Its filename is rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jan Kardell <jan.kardell@xxxxxxxxxx> Subject: rtc: pcf8563: fix write of invalid bits to ST2 reg The NXP datasheet says: "Bits labeled as N should always be written with logic 0." At least one of those bits is sometime read as a 1, therfore violating this rule. To fix this we mask away those bits. Signed-off-by: Jan Kardell <jan.kardell@xxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Grant Likely <grant.likely@xxxxxxxxxx> Cc: Rob Herring <robh+dt@xxxxxxxxxx> Cc: Vincent Donnefort <vdonnefort@xxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-pcf8563.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg drivers/rtc/rtc-pcf8563.c --- a/drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg +++ a/drivers/rtc/rtc-pcf8563.c @@ -28,6 +28,7 @@ #define PCF8563_REG_ST2 0x01 #define PCF8563_BIT_AIE (1 << 1) #define PCF8563_BIT_AF (1 << 3) +#define PCF8563_BITS_ST2_N (7 << 5) #define PCF8563_REG_SC 0x02 /* datetime */ #define PCF8563_REG_MN 0x03 @@ -130,7 +131,7 @@ static int pcf8563_set_alarm_mode(struct else buf &= ~PCF8563_BIT_AIE; - buf &= ~PCF8563_BIT_AF; + buf &= ~(PCF8563_BIT_AF | PCF8563_BITS_ST2_N); err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, &buf); if (err < 0) { _ Patches currently in -mm which might be from jan.kardell@xxxxxxxxxx are rtc-pcf8563-remove-leftover-code.patch rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg.patch rtc-pcf8563-fix-wrong-time-from-read_alarm.patch rtc-pcf8563-handle-consequeces-of-lacking-second-alarm-reg.patch rtc-pcf8563-save-battery-power.patch rtc-pcf8563-clear-expired-alarm-at-boot-time.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html