rtc: rv3028: Add support for "aux-voltage-chargeable" property
authorAndrej Picej <andrej.picej@norik.com>
Fri, 23 Jun 2023 08:15:33 +0000 (10:15 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 27 Jul 2023 21:13:12 +0000 (23:13 +0200)
commit3c87b351809f220294aec3c0df7b078ff5c5b15b
tree94040368da57c014ec7fa30eff8c9ffbc5f45e04
parent766c3f8a092b4d42abd68ee0338349838430a5ee
rtc: rv3028: Add support for "aux-voltage-chargeable" property

Property "trickle-resistor-ohms" allows us to set trickle charger
resistor. However there is no possibility to disable it afterwards.

Add support for "aux-voltage-chargeable" property which can be used to
enable/disable the trickle charger circuit explicitly. The default
behavior of the code is kept as it is!

Additionally, lets make sure we only update internal EEPROM in case of a
change. This prevents wear due to excessive EEPROM writes on each probe.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Link: https://lore.kernel.org/r/20230623081533.76334-1-andrej.picej@norik.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rv3028.c