Re: [PATCH 3/3] iio: adc: ad7192: Clarify binding documentation

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

 



On 13/04/2023 20:19, Fabrizio Lamarque wrote:
> On Thu, Apr 13, 2023 at 6:35 PM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>>
>> On 13/04/2023 18:07, Fabrizio Lamarque wrote:
>>> On Thu, Apr 13, 2023 at 4:21 PM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>>>>
>>>> On 13/04/2023 10:36, Fabrizio Lamarque wrote:
>>>
>>> Current documentation does not follow existing source code implementation.
>>
>> Bindings describe hardware, not current implementation.
> 
> OK, I'll keep in mind the perspective while describing the change.
> The bug corrected by 2/2 was found because the external crystal
> oscillator did not work and the internal, fixed clock was always used.
> Before the correction, the  driver did not load correctly without the
> clocks property. At the same time, the specified frequency was ignored
> and the fixed, internal frequency was used instead.
> After the correction, I found the documentation telling that clock
> property is mandatory, while omitting it is the way to use the
> internal, fixed frequency, clock.
> The documentation did not explain how to choose between the internal
> and external oscillator, but the driver was already designed to
> implement the choice.
> 
>>> The driver has been originally designed to operate with the internal
>>> clock when clocks property is omitted.
>>
>> Not really a reason to do it. Reason could be - hardware does not always
>> need clock input.
> 
> I hope the change in perspective will be enough. The external clock is
> mandatory for some applications.
> The internal clock might be required for others.

I told you that reason you wrote is not enough and you answer "in
perspective will be enough". Wait, what? I don't understand it at all. I
gave you example reason. If you do not like it, find other reasons which
refer to the actual device, not to the specific implementation.

>>>
>>> I thought the reason is clear from patch 2, but, as Nuno Sá already
>>> suggested, I will describe the reasons in full again, each time I post
>>> a revised patch set, even if it is quite verbose.
>>
>> Your commit must answer to why you are doing it. What you are doing is
>> easily visible from the diff. Rephrase commit msg to explain it and add
>> proper rationale (hardware related, not driver).
> 
> I am really just suggesting to align the documentation with the
> driver, since the driver operates the hardware as expected (after the
> two regressions fixes).

Does it mean you are not going to answer to "why?"? I cannot accept such
commits. That's the basics of software development and versioning. It's
not even Linux kernel related...


> Without this change, one should read the source code to understand
> which clock is used and when, which bindings have to be applied, and
> find that documentation mandates an (already) optional property.

How is it related? I did not refer whether change is reasonable itself
or not. I said you commit msg is very poor and you must answer to "why".
Not to "what".

(...)

> 
>>>
>>> I kindly ask you whether the entire (corrected) change on the
>>> documentation file only (without any change on the driver source code)
>>> could be accepted as a single patch.
>>
>> I don't understand the question. Each change should be one logical
>> change, but bindings are not related to the driver.
> 
> The question came after this:
> 
> On Thu, Apr 13, 2023 at 1:21 PM Nuno Sá <noname.nuno@xxxxxxxxx> wrote:
>>> I kindly ask you to confirm if, as per your suggestion, I should send
>>> a v3 patch series with the proper "fixes" tag and this last one
>>> changed as follows:
>>>
>>>  - No changes on driver side (keep avdd-supply instead of vref-supply)
>>>  - Indicate in bindings documentation that avdd-supply is vref instead
>>> (with the "Phandle to reference voltage regulator")
>>>  - Add dependencies to yaml bindings
>>>
>> Yeps, but note that for the bindings patch you are making distinct changes (
>> adding missing properties and changing one) so someone might complain. But for
>> me, personally, they are simple enough that can go in one patch. Just properly
>> document it in the commit description.
> 
> I really need to send a proper, complete and acceptable v3 patch set,
> or drop patch 3/3 from the set.
> 
> Would you accept the change to adi,ad7192.yaml file alone with both
> the change in description of avdd-supply and the additional missing
> properties?

Do you mean by this changing bindings without changing driver? Then
depends on the context. The driver must implement bindings, so you
should not send patches which break the implementation of interface.


> Is "Phandle to reference voltage regulator" as a description for
> avdd-supply acceptable on your side?

Sorry, how is this related to our topic? Anyway, drop "phandle to",
because you should describe hardware, not syntax of DTS.

> In case you feel the proposed adjustments are not enough or changes in
> documentation are unworthy, I feel it would be better to leave them to
> the driver maintainers.

I don't understand. I wrote nowhere that changes are unworthy. I pointed
out specific issues which need to be fixed. Can we focus on specific
issues, not on some other unrelated parts?

> Otherwise, I'll do my best (according to my limited expertise, to the
> available time and the acceptable costs for the company I work for) to
> provide something acceptable.
Best regards,
Krzysztof




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux