drivers: rtc-rpi: add battery charge circuit control and readback
authorJonathan Bell <jonathan@raspberrypi.com>
Fri, 15 Sep 2023 16:33:03 +0000 (17:33 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:34:53 +0000 (11:34 +0000)
commitcc722bea61a59c6773460e24367bd91b1d077f98
tree03c7949bd4ecfb3cefe51e34294fb17aa55011b4
parentf184cb11c83f2853a48c1b8944e22b992dea2ed2
drivers: rtc-rpi: add battery charge circuit control and readback

Parse devicetree for a charger voltage and apply it. If nonzero and a
valid voltage, the firmware will enable charging, otherwise the charger
circuit is disabled.

Add sysfs attributes to read back the supported charge voltage range,
the measured battery voltage, and the charger setpoint.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/rtc/rtc-rpi.c