From: Peter Rosin <peda@axentia.se>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: iio: afe: current-sense-shunt: add io-channel-cells
Date: Sat, 8 May 2021 00:44:58 +0200 [thread overview]
Message-ID: <0e68ca18-7d8c-12ab-59b1-56404b29be77@axentia.se> (raw)
In-Reply-To: <20210506150637.35288-1-krzysztof.kozlowski@canonical.com>
Hi!
On 2021-05-06 17:06, Krzysztof Kozlowski wrote:
> The current-sense-shunt is an IIO provider thus can be referenced by IIO
> consumers (via "io-channels" property in consumer device node).
> Such provider is required to describe number of cells used in phandle
> lookup with "io-channel-cells" property. This also fixes dtbs_check
> warnings like:
>
> arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: current-sense-shunt:
> '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
>
> Fixes: ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
> .../devicetree/bindings/iio/afe/current-sense-shunt.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml b/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml
> index 90439a8dc785..05166d8a3124 100644
> --- a/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml
> +++ b/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml
> @@ -24,12 +24,16 @@ properties:
> description: |
> Channel node of a voltage io-channel.
>
> + "#io-channel-cells":
> + const: 0
> +
> shunt-resistor-micro-ohms:
> description: The shunt resistance.
>
> required:
> - compatible
> - io-channels
> + - "#io-channel-cells"
> - shunt-resistor-micro-ohms
I know I'm listed as maintainer and all, but I have not kept up with the yaml
conversion. Sorry. So, given that I might very well fundamentally misunderstand
something, it does not sound correct that #io-channel-cells is now "required".
I regard it as optional, and only needed if some other in-kernel driver is
consuming the sensed current. What am I missing?
Also, whatever is done in this binding should preferably also be done in the
two "sister" afe bindings, i.e. current-sense-amplifier and voltage-divider.
Cheers,
Peter
> additionalProperties: false
> @@ -57,6 +61,7 @@ examples:
> sysi {
> compatible = "current-sense-shunt";
> io-channels = <&tiadc 0>;
> + #io-channel-cells = <0>;
>
> /* Divide the voltage by 3300000/1000000 (or 3.3) for the current. */
> shunt-resistor-micro-ohms = <3300000>;
>
next prev parent reply other threads:[~2021-05-07 22:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 15:06 [PATCH] dt-bindings: iio: afe: current-sense-shunt: add io-channel-cells Krzysztof Kozlowski
2021-05-07 22:16 ` Rob Herring
2021-05-07 22:44 ` Peter Rosin [this message]
2021-05-08 15:59 ` Jonathan Cameron
2021-05-10 12:17 ` Krzysztof Kozlowski
2021-05-11 14:19 ` 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=0e68ca18-7d8c-12ab-59b1-56404b29be77@axentia.se \
--to=peda@axentia.se \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).