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

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

 



On Fri, Apr 14, 2023 at 11:18 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>
> 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.
> >
> >>> 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...
>

I already wrote that the hardware clock might be generated internally
and hence not required, but also that an external crystal/oscillator
is suggested in the datasheet for better performance.
There shall be a method to choose between the crystal, the external
oscillator and the internal oscillator.
This is what I was expecting to write on revised commit information,
and this was the hopefully accepted "perspective change".

I am really sorry but I do not understand what more I should say here.
I appreciate your explanations and the fact you are taking your time
to give directions to an obviously inexperienced developer, but my
lack of understanding is perhaps related to what I called
"perspective" on which comes first.
If the above sentence is not enough, I will drop this last patch.
I did not change the driver at all. The documentation is wrong (where
it states the clocks property is mandatory) and it was missing
information on how to choose between the clocks from the beginning.

>
> > 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.
>

Perhaps I failed to explain it from the beginning.
I said "the documentation does not follow the driver" but I understand
I should have seen it the other way round.

Actual documentation does not allow the use of the internal oscillator
or the external crystal.
By strictly following the documentation I could only use the external
oscillator option (neither internal nor external crystal oscillator).
The implementation already had in place more binding options than the
documented ones, so I am not suggesting to break anything.

>
> > 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.

Ok.
 - Is it acceptable to change the description of property
"avdd-supply" from "AVdd voltage supply" to "VRef voltage supply"?
 - It is clear that AVDD pin (almost always tied with DVDD pin with a
passive filter in the middle) on hardware is not VREF pin, but
property avdd-supply is treated by the implementation as if it were
VREF (it's just a matter of misleading name)? I am asking this because
any (perhaps) formally correct change would break compatibility with
existing implementations and, according to previous discussions with
driver maintainers, I am not going to suggest binding name changes any
more. In case of doubt, I will skip this change in description until a
better solution is found.
 - In the hope to submit a patch that does not require additional
corrections, is a single patch acceptable with both a change in
description and with the added missing properties (already existing in
implementation), or should it be split in two?

Best regards,
Fabrizio Lamarque




[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