dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 15 Jun 2023 10:58:21 +0000 (12:58 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Aug 2023 23:27:01 +0000 (01:27 +0200)
commit69b569c124ffa698de25d039018fe86313c46c84
tree66e73707e2869da1d7751321ac05c28f5d0311c7
parentffc005280a47030d16cbbf3105c75d3562dba5a8
dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels

The isl12022 has a built-in support for monitoring the voltage of the
backup battery, and setting bits in the status register when that
voltage drops below two predetermined levels (usually 85% and 75% of
the nominal voltage). However, since it can operate at wide range of
battery voltages (2.5V - 5.5V), one must configure those trip levels
according to which battery is used on a given board.

Add bindings for defining these two trip levels. While the register
and bit names suggest that they should correspond to 85% and 75% of
the nominal battery voltage, the data sheet also says

  There are total of 7 levels that could be selected for the first
  alarm. Any of the of levels could be selected as the first alarm
  with no reference as to nominal Battery voltage level.

Hence this provides the hardware designer the ability to choose values
based on the discharge characteristics of the battery chosen for the
given product, rather than just having one battery-microvolt property
and having the driver choose levels close to 0.85/0.75 times that.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230615105826.411953-4-linux@rasmusvillemoes.dk
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml