Re: [PATCH v1 1/4] dt-bindings: power: supply: maxim,max17040: update properties

From: Krzysztof Kozlowski
Date: Wed Mar 08 2023 - 05:54:00 EST


On 08/03/2023 11:51, Svyatoslav Ryhel wrote:
> ср, 8 бер. 2023 р. о 12:44 Krzysztof Kozlowski
> <krzysztof.kozlowski@xxxxxxxxxx> пише:
>>
>> On 08/03/2023 10:15, Svyatoslav Ryhel wrote:
>>
>>>> max17040 does not have ADC temperature input... so is it system
>>>> configuration?
>>>>
>>>
>>> yes, I own a device (LG Optimus Vu P895) which uses max17043
>>> coupled with ADC thermal sensor
>>>
>>>>> +
>>>>> + io-channel-names:
>>>>> + items:
>>>>> + - const: temp
>>>>
>>>> Drop the names property, not needed for one item.
>>>>
>>>
>>> Alright, but driver patch expects temp name. I will look if this
>>> is adjustable.
>>
>> I think I saw cases without names.
>>
>
> There is no io-channel without a name. And io-channels are mostly used
> by power supply devices.
>
>>>
>>>>> +
>>>>> wakeup-source:
>>>>> type: boolean
>>>>> description: |
>>>>> @@ -95,3 +109,26 @@ examples:
>>>>> wakeup-source;
>>>>> };
>>>>> };
>>>>> + - |
>>>>> + #include <dt-bindings/interrupt-controller/irq.h>
>>>>> + i2c0 {
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <0>;
>>>>> +
>>>>> + fuel-gauge@36 {
>>>>> + compatible = "maxim,max17043";
>>>>> + reg = <0x36>;
>>>>> +
>>>>> + interrupt-parent = <&gpio>;
>>>>> + interrupts = <144 IRQ_TYPE_EDGE_FALLING>;
>>>>> +
>>>>> + monitored-battery = <&battery>;
>>>>> + power-supplies = <&charger>;
>>>>
>>>> But here you suggests something else than VDD... The hardware does not
>>>> take charger as input. It takes power supply - vdd.
>>>>
>>>
>>> Power system allows passing properties from other power devices.
>>> In this case battery health and status are passed from charger.
>>
>> So this is not an input to device? Then it does not really look like
>> property of this hardware. Fuel gauge does not control the charger, also
>> from system configuration point of view.
>>
>
> It is not controlling charger, the charger provides the status and
> health of the battery to the fuel gauge. This option is also used in
> other fuel gauges.

How regulator provides health and status of the battery? I don't understand.

Best regards,
Krzysztof