[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce89ecb8-3505-6aff-7aec-f7f1cf133656@linaro.org>
Date: Wed, 31 May 2023 21:52:09 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: ChiYuan Huang <cy_huang@...htek.com>
Cc: sre@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
chiaen_wu@...htek.com, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: power: supply: Fix rt9467 charger enable
gpio active level
On 31/05/2023 11:36, ChiYuan Huang wrote:
> On Wed, May 31, 2023 at 11:17:37AM +0200, Krzysztof Kozlowski wrote:
>> On 31/05/2023 10:46, cy_huang@...htek.com wrote:
>>> From: ChiYuan Huang <cy_huang@...htek.com>
>>>
>>> The RT9467 charger enable pin is an external signal that used to enable
>>> battery charging. From the datasheet, the active level is low. Although
>>> it's already configured to logic low at driver probe function, but the
>>
>> NAK.
>>
>> You mix two different things. Driver behavior and DTS. Driver can
>> operate either on real level - matching hardware - or on logical level
>> (high as enable, low as disable). First choice is usually wrong, because
>> it does not allow inverted signals.
>>
>> 'Correcting' bindings to wrong approach is wrong. If the signal is
>> active low, then the flag is active low. Simple as that.
>>
> If my understanding is right, so the correct way is to fix the driver code,
> not binding exmaple.
Yes, that's my opinion. The DTS should describe the hardware and in the
hardware the pin is active low.
Now the driver should operate on logical state, so it want to enable
(value of 1) or disable something (value of 0).
Best regards,
Krzysztof
Powered by blists - more mailing lists