All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Martin Botka <martin.botka@somainline.org>,
	Jami Kettunen <jami.kettunen@somainline.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 5/5] dt-bindings: iio: adc: Require generic `channel` name for channel nodes
Date: Wed, 12 Apr 2023 21:27:56 +0100	[thread overview]
Message-ID: <20230412212756.0b4b69f3@jic23-huawei> (raw)
In-Reply-To: <20230410202917.247666-6-marijn.suijten@somainline.org>

On Mon, 10 Apr 2023 22:29:17 +0200
Marijn Suijten <marijn.suijten@somainline.org> wrote:

> As discussed in [1] it is more convenient to use a generic `channel`
> node name for ADC channels while storing a friendly - board-specific
> instead of PMIC-specific - name in the label, if/when desired to
> overwrite the channel description already contained (but previously
> unused) in the driver [2].
> 
> The same `channel` node name pattern has also been set in
> iio/adc/adc.yaml, but this generic binding is not inherited as base for
> qcom,spmi-vadc bindings due to not having any other generic elements in
> common, besides the node name rule and reg property.
> 
> Replace the .* name pattern with the `channel` literal, but leave the
> label property optional for bindings to choose to fall back a channel
> label hardcoded in the driver [2] instead.
> 
> [1]: https://lore.kernel.org/linux-arm-msm/20221106193018.270106-1-marijn.suijten@somainline.org/T/#u
> [2]: https://lore.kernel.org/linux-arm-msm/20230116220909.196926-4-marijn.suijten@somainline.org/
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

There are various ways we could pick up this patch set...
a) Binding changes via individual subsystem trees,
b) All in on go.

I think it's late to guarantee to land the changes from (a) in the coming merge window
so if someone else is willing to do (b) then

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Otherwise we can do (a) early in next cycle.  Feel free to poke me if we are doing (b)
and I seem to have forgotten to pick up this patch!

Jonathan

> ---
>  .../bindings/iio/adc/qcom,spmi-vadc.yaml      | 26 ++++++++++---------
>  1 file changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> index bd6e0d6f6e0c..f30114424b92 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml
> @@ -54,7 +54,7 @@ required:
>    - '#io-channel-cells'
>  
>  patternProperties:
> -  "^.*@[0-9a-f]+$":
> +  "^channel@[0-9a-f]+$":
>      type: object
>      additionalProperties: false
>      description: |
> @@ -148,7 +148,7 @@ allOf:
>  
>      then:
>        patternProperties:
> -        "^.*@[0-9a-f]+$":
> +        "^channel@[0-9a-f]+$":
>            properties:
>              qcom,decimation:
>                enum: [ 512, 1024, 2048, 4096 ]
> @@ -171,7 +171,7 @@ allOf:
>  
>      then:
>        patternProperties:
> -        "^.*@[0-9a-f]+$":
> +        "^channel@[0-9a-f]+$":
>            properties:
>              qcom,decimation:
>                enum: [ 256, 512, 1024 ]
> @@ -194,7 +194,7 @@ allOf:
>  
>      then:
>        patternProperties:
> -        "^.*@[0-9a-f]+$":
> +        "^channel@[0-9a-f]+$":
>            properties:
>              qcom,decimation:
>                enum: [ 250, 420, 840 ]
> @@ -217,7 +217,7 @@ allOf:
>  
>      then:
>        patternProperties:
> -        "^.*@[0-9a-f]+$":
> +        "^channel@[0-9a-f]+$":
>            properties:
>              qcom,decimation:
>                enum: [ 85, 340, 1360 ]
> @@ -249,7 +249,7 @@ examples:
>              #io-channel-cells = <1>;
>  
>              /* Channel node */
> -            adc-chan@39 {
> +            channel@39 {
>                  reg = <0x39>;
>                  qcom,decimation = <512>;
>                  qcom,ratiometric;
> @@ -258,19 +258,19 @@ examples:
>                  qcom,pre-scaling = <1 3>;
>              };
>  
> -            adc-chan@9 {
> +            channel@9 {
>                  reg = <0x9>;
>              };
>  
> -            adc-chan@a {
> +            channel@a {
>                  reg = <0xa>;
>              };
>  
> -            adc-chan@e {
> +            channel@e {
>                  reg = <0xe>;
>              };
>  
> -            adc-chan@f {
> +            channel@f {
>                  reg = <0xf>;
>              };
>          };
> @@ -292,16 +292,18 @@ examples:
>              #io-channel-cells = <1>;
>  
>              /* Other properties are omitted */
> -            xo-therm@44 {
> +            channel@44 {
>                  reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
>                  qcom,ratiometric;
>                  qcom,hw-settle-time = <200>;
> +                label = "xo_therm";
>              };
>  
> -            conn-therm@47 {
> +            channel@47 {
>                  reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
>                  qcom,ratiometric;
>                  qcom,hw-settle-time = <200>;
> +                label = "conn_therm";
>              };
>          };
>      };


  parent reply	other threads:[~2023-04-12 20:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 20:29 [PATCH v4 0/5] dts: qcom: Use labels with generic node names for ADC channels Marijn Suijten
2023-04-10 20:29 ` [PATCH v4 1/5] ARM: " Marijn Suijten
2023-04-10 20:29 ` [PATCH v4 2/5] arm64: " Marijn Suijten
2023-04-10 20:29 ` [PATCH v4 3/5] dt-bindings: thermal: Use generic ADC node name in examples Marijn Suijten
2023-04-11  6:08   ` Krzysztof Kozlowski
2023-04-17  7:41   ` Daniel Lezcano
2023-04-10 20:29 ` [PATCH v4 4/5] dt-bindings: mfd: qcom,spmi-pmic: " Marijn Suijten
2023-04-11  6:08   ` Krzysztof Kozlowski
2023-04-20 10:21   ` Lee Jones
2023-04-10 20:29 ` [PATCH v4 5/5] dt-bindings: iio: adc: Require generic `channel` name for channel nodes Marijn Suijten
2023-04-11  6:09   ` Krzysztof Kozlowski
2023-04-12 20:27   ` Jonathan Cameron [this message]
2023-04-12 20:31     ` Marijn Suijten
2023-04-15 16:49       ` Jonathan Cameron
2023-05-01 16:18         ` Jonathan Cameron
2023-05-01 21:56           ` Marijn Suijten

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=20230412212756.0b4b69f3@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jami.kettunen@somainline.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.