OSDN Git Service

rtc: isl12022: implement RTC_VL_READ ioctl
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 15 Jun 2023 10:58:23 +0000 (12:58 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Aug 2023 23:27:01 +0000 (01:27 +0200)
commiteccebd813874b748ac4e79a9fe4c7290117ad3be
tree4681880861e2005aada4c68f7848dcac32357db4
parent2caeb566baabb65add7d99ca6d8bfd566fe91582
rtc: isl12022: implement RTC_VL_READ ioctl

Hook up support for reading the values of the SR_LBAT85 and SR_LBAT75
bits. Translate the former to "battery low", and the latter to
"battery empty or not-present".

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20230615105826.411953-6-linux@rasmusvillemoes.dk
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-isl12022.c