[PATCH 2/4] dt-bindings: power: supply: add max77759-fg flavor and don't require nvme address

Thomas Antoine t.antoine at uclouvain.be
Mon Dec 2 06:42:00 PST 2024


On 12/2/24 14:39, Krzysztof Kozlowski wrote:
> On 02/12/2024 14:07, Thomas Antoine via B4 Relay wrote:
>> From: Thomas Antoine <t.antoine at uclouvain.be>
>>
>> As the Maxim max77759 fuel gauge has no non-volatile memory slave address,
> 
> 
> s/max77759/MAX77759/
> 
> Please explain the device in general, e.g. fuel gauge is only one part
> of the PMIC chip. Otherwise 'fg' compatible suffix would not be justified.

The max77759 is an IC used to manage the power supply of the battery and
the USB-C. Based on drivers from google, it contains at least a PMIC, a
fuel gauge, a TPCI and a charger.

Given I saw that the linked proposed patch, which adds a driver for the
TCPCI, used the "maxim,max77759" compatible, I didn't want to create a
possible eventual conflict.

Link: https://lore.kernel.org/linux-devicetree/20241127-gs101-phy-lanes-orientation-dts-v1-0-5222d8508b71@linaro.org/

Will add this information to the commit description for v2.

>> @@ -16,6 +16,7 @@ properties:
>>    compatible:
>>      oneOf:
>>        - const: maxim,max17201
>> +      - const: maxim,max77759-fg
>>        - items:
>>            - enum:
>>                - maxim,max17205
>> @@ -25,11 +26,13 @@ properties:
>>      items:
>>        - description: ModelGauge m5 registers
>>        - description: Nonvolatile registers
>> +    minItems: 1
>>
>>    reg-names:
>>      items:
>>        - const: m5
>>        - const: nvmem
>> +    minItems: 1
> 
> You need allOf:if:then section narrowing it per each variant.
Will do in v2.

>>    interrupts:
>>      maxItems: 1
>> @@ -56,3 +59,14 @@ examples:
>>          interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
>>        };
>>      };
>> +  - |
>> +    i2c {
>> +      #address-cells = <1>;
>> +      #size-cells = <0>;
>> +
>> +      fuel-gauge at 36 {
>> +        compatible = "maxim,max77759-fg";
> 
> 
> No need for new example if it differs with one property.

Will remove in v2.



More information about the linux-arm-kernel mailing list