From: "Nuno Sá" <noname.nuno@gmail.com>
To: Fabrizio Lamarque <fl.scratchpad@gmail.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH 3/3] iio: adc: ad7192: Clarify binding documentation
Date: Thu, 13 Apr 2023 13:23:35 +0200 [thread overview]
Message-ID: <ed06e8c5786373f095f0d63fb88dfe7d3801f752.camel@gmail.com> (raw)
In-Reply-To: <CAPJMGm47CB6BrzRCkK6DTcDE7C9uA3DQXb9x5PXvxNJwUtD6HQ@mail.gmail.com>
On Thu, 2023-04-13 at 12:47 +0200, Fabrizio Lamarque wrote:
> On Thu, Apr 13, 2023 at 12:13 PM Nuno Sá <noname.nuno@gmail.com> wrote:
> >
> > On Thu, 2023-04-13 at 10:36 +0200, Fabrizio Lamarque wrote:
> > > ---
> > > .../bindings/iio/adc/adi,ad7192.yaml | 28 +++++++++++++++----
> > > drivers/iio/adc/ad7192.c | 18 ++++++------
> > > 2 files changed, 32 insertions(+), 14 deletions(-)
> > >
>
> > You should not mix bindings changes with driver changes... They should go in
> > separate patches.
>
> > + adi,clock-xtal:
> > + description: |
> > + This bit selects whether an external crystal oscillator or an
> > external
> > + clock is applied as master (mclk) clock. It is ignored when clocks
> > + property is not set.
> > + type: boolean
> > +
>
> It looks like you could use a dependency... Grep for "dependencies:" in the
> bindings folder.
>
> > > - st->avdd = devm_regulator_get(&spi->dev, "avdd");
> > > - if (IS_ERR(st->avdd))
> > > - return PTR_ERR(st->avdd);
> > > + st->vref = devm_regulator_get(&spi->dev, "vref");
> > > + if (IS_ERR(st->vref))
> > > + st->vref = devm_regulator_get(&spi->dev, "avdd");
> > > + if (IS_ERR(st->vref))
> > > + return PTR_ERR(st->vref);
> > >
> > I'm also not sure this will work as you expect. If no regulator is found,
> > you'll
> > still get a dummy one which means you won't ever reach the point to get
> > "avdd".
> > Look here:
> >
> > https://elixir.bootlin.com/linux/latest/source/drivers/regulator/core.c#L2137
> >
> > So I guess you could devm_regulator_get_optional() for "vref" and then move
> > forward to look for "avdd" if you get -ENODEV from the first call. But using
> > devm_regulator_get_optional() like this is really an __hack__ and not how
> > it's
> > supposed to be used. So maybe this is cumbersome enough to just let it be as
> > before? You can just update the description in the bindings.
> >
> > - Nuno Sá
>
> You are right. I missed it.
> 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.
> Thank you for your patience and for having this one reviewed again.
>
Sure, I also like to have my patches reviewed :)
- Nuno Sá
next prev parent reply other threads:[~2023-04-13 11:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 8:26 [PATCH v2 0/3] iio: adc: ad7192: Functional fixes Fabrizio Lamarque
2023-04-13 8:28 ` [PATCH v2 1/3] iio: adc: ad7192: Fix null pointer dereference on probe Fabrizio Lamarque
2023-04-13 8:33 ` [PATCH 2/3] iio: adc: ad7192: Fix internal/external clock selection Fabrizio Lamarque
2023-04-13 8:36 ` [PATCH 3/3] iio: adc: ad7192: Clarify binding documentation Fabrizio Lamarque
2023-04-13 10:15 ` Nuno Sá
2023-04-13 10:47 ` Fabrizio Lamarque
2023-04-13 11:23 ` Nuno Sá [this message]
2023-04-13 14:21 ` Krzysztof Kozlowski
2023-04-13 16:07 ` Fabrizio Lamarque
2023-04-13 16:35 ` Krzysztof Kozlowski
2023-04-13 18:19 ` Fabrizio Lamarque
2023-04-14 9:18 ` Krzysztof Kozlowski
2023-04-14 10:42 ` Fabrizio Lamarque
2023-04-15 16:38 ` Jonathan Cameron
2023-04-26 10:45 ` Fabrizio Lamarque
2023-05-01 16:03 ` Jonathan Cameron
2023-04-13 10:04 ` [PATCH 2/3] iio: adc: ad7192: Fix internal/external clock selection Nuno Sá
2023-04-15 16:39 ` Jonathan Cameron
2023-04-13 10:03 ` [PATCH v2 1/3] iio: adc: ad7192: Fix null pointer dereference on probe Nuno Sá
2023-04-15 16:41 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed06e8c5786373f095f0d63fb88dfe7d3801f752.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=fl.scratchpad@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox