* [PATCH v2 0/2] power: supply: add support for MAX1720x standalone fuel
@ 2024-06-15 20:25 Dimitri Fedrau
2024-06-15 20:25 ` [PATCH v2 1/2] dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge Dimitri Fedrau
0 siblings, 1 reply; 2+ messages in thread
From: Dimitri Fedrau @ 2024-06-15 20:25 UTC (permalink / raw)
Cc: Dimitri Fedrau, Sebastian Reichel, linux-kernel, linux-pm
Changes to max1721x_battery.c:
- reading manufacturer, model name and serial number is only possible
when SBS functions of the IC are enabled.(nNVCfg0.enSBS) Factory
default is off. Manufacturer is "Maxim Integrated" and the model name
can be derived by register MAX172XX_DEV_NAME. Serial number is not
available anymore.
- According to the datasheet MAX172XX_BAT_PRESENT is at BIT(3) not
BIT(4). Furthermore the naming is misleading, when BIT(3) is set the
battery is not present.
- Removed DeviceName, ManufacturerName and SerialNumber from struct
max17211_device_info
Changes in V2:
- Changed E-Mail in Patch (2/2) Signed-Off
Dimitri Fedrau (2):
dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel
gauge
power: supply: add support for MAX1720x standalone fuel gauge
.../bindings/power/supply/maxim,max1720x.yaml | 51 +++
drivers/power/supply/Kconfig | 12 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/max1720x_battery.c | 324 ++++++++++++++++++
4 files changed, 388 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
create mode 100644 drivers/power/supply/max1720x_battery.c
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH v2 1/2] dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge
2024-06-15 20:25 [PATCH v2 0/2] power: supply: add support for MAX1720x standalone fuel Dimitri Fedrau
@ 2024-06-15 20:25 ` Dimitri Fedrau
0 siblings, 0 replies; 2+ messages in thread
From: Dimitri Fedrau @ 2024-06-15 20:25 UTC (permalink / raw)
Cc: Dimitri Fedrau, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-pm, devicetree,
linux-kernel
Adding documentation for MAXIMs MAX17201/MAX17205 fuel gauge.
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
---
.../bindings/power/supply/maxim,max1720x.yaml | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
new file mode 100644
index 000000000000..4414bc6f214f
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/maxim,max1720x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX1720x fuel gauge
+
+maintainers:
+ - Dimitri Fedrau <dima.fedrau@gmail.com>
+
+properties:
+ compatible:
+ const: maxim,max1720x
+
+ reg:
+ items:
+ - description: ModelGauge m5 registers
+ - description: Nonvolatile registers
+
+ reg-names:
+ items:
+ - const: m5
+ - const: nvmem
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ max17201@36 {
+ compatible = "maxim,max1720x";
+ reg = <0x36>, <0xb>;
+ reg-names = "m5", "nvmem";
+ interrupt-parent = <&gpio0>;
+ interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
+ status = "okay";
+ };
+ };
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-15 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-15 20:25 [PATCH v2 0/2] power: supply: add support for MAX1720x standalone fuel Dimitri Fedrau
2024-06-15 20:25 ` [PATCH v2 1/2] dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge Dimitri Fedrau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox