From: Jonathan Cameron <jic23@kernel.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "Nuno Sá" <noname.nuno@gmail.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: addac: ad74413: don't set DIN_SINK for functions other than digital input
Date: Sun, 28 May 2023 20:13:01 +0100 [thread overview]
Message-ID: <20230528201301.68b31bca@jic23-huawei> (raw)
In-Reply-To: <822d2741-32ff-fc73-28a5-25575ab3cc52@rasmusvillemoes.dk>
On Mon, 22 May 2023 10:44:11 +0200
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> On 06/05/2023 20.16, Jonathan Cameron wrote:
> > On Thu, 4 May 2023 12:08:53 +0200
> > Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> >
> >> On 04/05/2023 09.28, Nuno Sá wrote:
>
> >>> Can anyone have a working device by specifying that dt parameter
> >>> on a non digital channel (or expect something from having that parameter set)?
> >>> Or the only effect is to actually have some functions misbehaving?
> >>
> >> The data sheet doesn't say that the DIN_SINK should have any effect for
> >> other functions, so I'm pretty sure it's only the latter: some functions
> >> misbehave.
> >>
> >>> On the driver side, if it's never right to have
> >>> these settings together, then the patch is valid since if someone has this, his
> >>> configuration is broken anyways (maybe that's also a valid point for the
> >>> bindings)...
> >>
> >> Yes, I do believe that it's a broken description (whether or not the
> >> bindings specify that), and drivers don't need to go out of their way to
> >> validate or fixup such brokenness. But in this particular case, there's
> >> really no extra burden on the driver to not put garbage in DIN_SINK when
> >> a not-digital-input function has been chosen (the patch is a two-liner
> >> with 'git show -w').
> >
> > If we can tighten the DT binding to rule out something that should not be
> > set than that would be good. Tightening bindings is fine - we don't mind
> > validation of bindings failing on peoples DTs as long as we didn't 'break'
> > them actually working.
>
> Well, I'm afraid I don't have any idea how to spell that constraint in
> the yaml-language (help appreciated).
Lots of examples in tree of this sort of thing. Look for a
: false with something other than additionalProperties or unevaluatedProperties
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
for example.
In short you have an allOf block containing a list of rules, one of which
is a match on particular conditions to set particular properties to 'false'
which means that any attempt to have them set when that condition is met
results in an error from the dts checking scripts.
>
> And I assume a dt binding update would be a separate patch anyway, so
> could you please consider applying this patch?
Fair enough. Applied to the fixes-togreg branch of iio.git.
Thanks,
Jonathan
>
> Thanks,
> Rasmus
>
prev parent reply other threads:[~2023-05-28 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 10:50 [PATCH] iio: addac: ad74413: don't set DIN_SINK for functions other than digital input Rasmus Villemoes
2023-05-04 7:28 ` Nuno Sá
2023-05-04 10:08 ` Rasmus Villemoes
2023-05-06 18:16 ` Jonathan Cameron
2023-05-22 8:44 ` Rasmus Villemoes
2023-05-28 19:13 ` Jonathan Cameron [this message]
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=20230528201301.68b31bca@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=cosmin.tanislav@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=noname.nuno@gmail.com \
/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