]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf2127: fix alarm handling
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Aug 2020 08:51:14 +0000 (10:51 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Aug 2020 09:48:29 +0000 (11:48 +0200)
commit0f4d10677b1544538d2b171fe2fb30661c2666c1
treeb3ac00f460235de70d87c81d5e2f84d5e0b9113f
parentbef23702f3c251b9bfa7aae6bef0b896d28da5ca
rtc: pcf2127: fix alarm handling

Fix multiple issues when handling alarms:
 - Use threaded interrupt to avoid scheduling when atomic
 - Stop matching on week day as it may not be set correctly
 - Avoid parsing the DT interrupt and use what is provided by the i2c or
   spi subsystem
 - Avoid returning IRQ_NONE in case of error in the interrupt handler
 - Never write WDTF as specified in the datasheet
 - Set uie_unsupported, as for the pcf85063, setting alarms every seconds
   is not working correctly and confuses the RTC.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200812085114.474903-1-alexandre.belloni@bootlin.com
drivers/rtc/rtc-pcf2127.c