Re: [PATCH] dt-bindings: power: supply: Fix rt9467 charger enable gpio active level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx wrote:
>>> From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
>>>
>>> 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux