lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251124-pmi8998_fuel_gauge-v1-1-dd3791f61478@ixit.cz>
Date: Mon, 24 Nov 2025 22:53:34 +0100
From: David Heidelberg via B4 Relay <devnull+david.ixit.cz@...nel.org>
To: Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>, 
 Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, 
 Casey Connolly <casey.connolly@...aro.org>, 
 Casey Connolly <casey@...nolly.tech>, Joel Selvaraj <foss@...lselvaraj.com>, 
 Yassine Oudjana <y.oudjana@...tonmail.com>, 
 Bjorn Andersson <andersson@...nel.org>, 
 Konrad Dybcio <konradybcio@...nel.org>, 
 Alexander Martinz <amartinz@...ftphones.com>, 
 Barnabás Czémán <barnabas.czeman@...nlining.org>, 
 Richard Acayan <mailingradian@...il.com>, 
 Alexey Minnekhanov <alexeymin@...tmarketos.org>
Cc: linux-pm@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org, 
 phone-devel@...r.kernel.org, David Heidelberg <david@...t.cz>
Subject: [PATCH RFC 1/8] dt-bindings: power: supply: Add schema for
 Qualcomm pmi8998 fuel gauge

From: Yassine Oudjana <y.oudjana@...tonmail.com>

Add a device-tree schema for Qualcomm PMIC 8998 fuel gauge.

Signed-off-by: Barnabás Czémán <barnabas.czeman@...nlining.org>
Signed-off-by: Yassine Oudjana <y.oudjana@...tonmail.com>
---
 .../bindings/power/supply/qcom,pmi8998-fg.yaml     | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/supply/qcom,pmi8998-fg.yaml b/Documentation/devicetree/bindings/power/supply/qcom,pmi8998-fg.yaml
new file mode 100644
index 0000000000000..9acc1a7f04cda
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/qcom,pmi8998-fg.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-3-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/qcom,pmi8998-fg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm PMI8998 PMIC Fuel Gauge
+
+maintainers:
+  - Casey Connolly <casey@...nolly.tech>
+  - Joel Selvaraj <foss@...lselvaraj.com>
+  - Yassine Oudjana <y.oudjana@...tonmail.com>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml#
+
+properties:
+  compatible:
+    const: qcom,pmi8998-fg
+
+  reg:
+    maxItems: 1
+
+  monitored-battery:
+    description: |
+       phandle of battery characteristics node.
+       The fuel gauge uses the following battery properties:
+       - charge-full-design-microamp-hours
+       - voltage-min-design-microvolt
+       - voltage-max-design-microvolt
+       See Documentation/devicetree/bindings/power/supply/battery.yaml
+
+  interrupts:
+    items:
+      - description: State of charge change interrupt
+
+  interrupt-names:
+    items:
+      - const: soc-delta
+
+  power-supplies: true
+
+required:
+  - compatible
+  - reg
+  - monitored-battery
+  - interrupts
+  - interrupt-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    battery: battery {
+      compatible = "simple-battery";
+
+      charge-full-design-microamp-hours = <4070000>;
+      voltage-min-design-microvolt = <3400000>;
+      voltage-max-design-microvolt = <4400000>;
+    };
+
+    pmic {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      fuel-gauge@...0 {
+        compatible = "qcom,pmi8998-fg";
+        reg = <0x4000>;
+
+        interrupts = <0x2 0x40 0x4 IRQ_TYPE_EDGE_RISING>;
+        interrupt-names = "soc-delta";
+
+        monitored-battery = <&battery>;
+      };
+    };

-- 
2.51.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ