Re: [PATCH 4/6] dt-bindings: power: supply: add MAX77659 charger binding

From: Krzysztof Kozlowski
Date: Tue Apr 18 2023 - 08:30:50 EST


On 18/04/2023 11:41, Arslanbenzer, Zeynep wrote:
>>>> No, use suffixes for common units.
>>>
>>> Hi Krzysztof,
>>>
>>> Thank you for your review. The possible register values of the fast charge safety timer are described in the datasheet as follows. I was undecided about using the common unit, second, as it may affect the comprehensibility of the code. Of course, I can use second as the common unit if you think it's more appropriate.
>>
>> This is quite common property, so I do not understand why this one driver should have it written differently. I understand that parsing
>> 0/1/2/3 is easier for the machine than 0/3/5/7 but it is not easier for humans.
>
> I referenced property-units.yaml for common units.
>
> As I understood hours and minutes are not common units in Linux for time so I cannot use them as suffixes. Therefore, I thought I had to use "seconds" instead of "hours" or "minutes". I am totally fine if I can use " adi,fast-charge-timer-hours" and "adi,topoff-timer-minutes".

Wrap your replies to match mailing list style.

Yeah... indeed... because it should not be in DTS in the first place.
It's not a property of the hardware, so the same as with other drivers -
we don't store it in DT. Check other maxim drivers.

>
>>
>>>
>>> 0b00 = Timer disabled
>>> 0b01 = 3 hours
>>> 0b10 = 5 hours
>>> 0b11 = 7 hours
Best regards,
Krzysztof