rtc: isl12022: implement support for the #clock-cells DT property
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 15 Jun 2023 10:58:26 +0000 (12:58 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Aug 2023 23:27:01 +0000 (01:27 +0200)
commitd57d12db774820819d0e591548a56b5cfc95f82a
tree7277e83057052eb34ded5f927ffb0cedba55a57c
parentab246c897be0bdf981f776399ca62b5ec4b8138f
rtc: isl12022: implement support for the #clock-cells DT property

If device tree implies that the chip's IRQ/F_OUT pin is used as a
clock, expose that in the driver. For now, pretend it is a
fixed-rate (32kHz) clock; if other use cases appear the driver can be
updated to provide its own clk_ops etc.

When the clock output is not used on a given board, one can prolong
the battery life by ensuring that the FOx bits are 0. For the hardware
I'm currently working on, the RTC draws 1.2uA with the FOx bits at
their default 0001 value, dropping to 0.88uA when those bits are
cleared.

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