]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dt-bindings: power: supply: sc27xx-fg: add low voltage alarm IRQ
authorStanislav Jakubek <stano.jakubek@gmail.com>
Thu, 15 Aug 2024 10:01:36 +0000 (12:01 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 27 Aug 2024 09:44:24 +0000 (11:44 +0200)
The SC27XX fuel gauge supports a low voltage alarm IRQ, which is used
for more accurate battery capacity measurements with lower voltages.

This was unfortunately never documented in bindings, do so now.

The only in-tree user (sc2731.dtsi) has had interrupts specified
since its initial fuel-gauge submission and the current kernel
driver returns an error when no interrupt is specified, so also
add it to the required list.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/Zr3SAHlq5A78QvrW@standask-GA-A55M-S2HP
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/devicetree/bindings/power/supply/sc27xx-fg.yaml

index de43e45a43b7c3bcdd1baca7ab588b9605292259..9108a2841caf669bbf8afb80c5c173e024624b53 100644 (file)
@@ -27,6 +27,9 @@ properties:
   battery-detect-gpios:
     maxItems: 1
 
+  interrupts:
+    maxItems: 1
+
   io-channels:
     items:
       - description: Battery Temperature ADC
@@ -53,6 +56,7 @@ required:
   - compatible
   - reg
   - battery-detect-gpios
+  - interrupts
   - io-channels
   - io-channel-names
   - nvmem-cells
@@ -88,6 +92,8 @@ examples:
         compatible = "sprd,sc2731-fgu";
         reg = <0xa00>;
         battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
+        interrupt-parent = <&sc2731_pmic>;
+        interrupts = <4>;
         io-channels = <&pmic_adc 5>, <&pmic_adc 14>;
         io-channel-names = "bat-temp", "charge-vol";
         nvmem-cells = <&fgu_calib>;