[PATCH v5 2/4] dt-bindings: power: supply: add support for MAX77759 fuel gauge
Krzysztof Kozlowski
krzk at kernel.org
Tue Aug 5 01:32:55 PDT 2025
On 04/08/2025 16:26, Thomas Antoine via B4 Relay wrote:
> + monitored-battery:
You don't have the type defined because of missing power supply ref.
> + description: |
> + The fuel gauge needs the following battery properties:
> + - charge-full-design-microamp-hours
> + - charge-term-current-microamp
> +
> + nvmem-cells:
> + maxItems: 1
> + description: |
> + Saved fuel gauge state. This state will be used during the initialization
> + and saved on exit. It must be initialized beforehand.
> + Its layout must be composed of
> + - RCOMP0 (characterization of the open-circuit voltage)
> + - TCOMPO (temperature compensation information)
> + - FULLCAPREP (reported full capacity)
> + - QRTABLE00, QRTABLE10, QRTABLE20, QRTABLE30 (cell capacity information)
> + - cv_mixcap (remaining capacity of the cell without empty compensation)
> + - cv_halftime (time-to-full characterization time constant)
> + They must all be aligned on 2 bytes. A valid CRC8 checksum must
> + also be found at the end (polynomial x^8 + x^2 + x + 1).
> +
> + nvmem-cell-names:
> + const: fg_state
> +
> +required:
> + - compatible
> + - reg
> + - shunt-resistor-micro-ohms
> + - monitored-battery
> + - nvmem-cells
> + - nvmem-cell-names
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + fuel-gauge at 36 {
> + compatible = "maxim,max77759-fg";
> + reg = <0x36>;
> + interrupt-parent = <&gpa9>;
> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> + shunt-resistor-micro-ohms = <5000>;
> + monitored-battery = <&battery>;
> + nvmem-cell-names = "fg_state";
> + nvmem-cells = <&fg_state>;
Reverse the order of these two.
> + };
> + };
>
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list