[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3190ecb-76fb-2d57-c4a9-2d65bb0e8d33@linaro.org>
Date: Wed, 8 Mar 2023 12:12:28 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Svyatoslav Ryhel <clamor95@...il.com>
Cc: Iskren Chernev <me@...ren.info>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Matheus Castello <matheus@...tello.eng.br>,
Sebastian Reichel <sre@...nel.org>,
Rob Herring <robh+dt@...nel.org>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/4] dt-bindings: power: supply: maxim,max17040: update
properties
On 08/03/2023 12:06, Svyatoslav Ryhel wrote:
> ср, 8 бер. 2023 р. о 12:53 Krzysztof Kozlowski
> <krzysztof.kozlowski@...aro.org> пише:
>>
>> On 08/03/2023 11:51, Svyatoslav Ryhel wrote:
>>> ср, 8 бер. 2023 р. о 12:44 Krzysztof Kozlowski
>>> <krzysztof.kozlowski@...aro.org> пише:
>>>>
>>>> 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.
>>
>
> It is not a regulator, it is a charger! Dedicated chip responsible for
> controlling charging. And its configuration allows it to get battery
> health and status, because this fuel gauge does not have this
> function.
Ah, you are right. I confused with power-supply. It is fine.
Best regards,
Krzysztof
Powered by blists - more mailing lists