OSDN Git Service

rtc: pcf2127: add error checking when disabling POR0
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Fri, 28 Jul 2023 17:12:12 +0000 (13:12 -0400)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 16 Aug 2023 23:01:24 +0000 (01:01 +0200)
commite4163fc59d088caf3250cc9c9862239a954d85b5
tree720c09e1fa042fe1b328796061c01f4e0235189b
parent4e5eb7ef73c4c45e2e621eb51a76565153b63afe
rtc: pcf2127: add error checking when disabling POR0

If PCF2127 device is absent from the I2C bus, or if there is a
communication problem, disabling POR0 may fail silently and we
still continue with probing the device. In that case, abort probe
operation.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20230728171211.3016019-1-hugo@hugovil.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf2127.c