devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Praveenkumar I <quic_ipkumar@quicinc.com>,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, amitk@kernel.org,
	thara.gopinath@gmail.com, rafael@kernel.org,
	daniel.lezcano@linaro.org, rui.zhang@intel.com,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: quic_varada@quicinc.com
Subject: Re: [PATCH 1/6] dt-bindings: thermal: tsens: Add nvmem cells for calibration data
Date: Tue, 11 Jul 2023 11:52:35 +0200	[thread overview]
Message-ID: <37aa7ae8-206e-3a48-b90d-22d49e86c675@linaro.org> (raw)
In-Reply-To: <59ea653e-c5da-71cb-eb85-1aa3c72e2089@quicinc.com>

On 11/07/2023 11:39, Praveenkumar I wrote:
> 
> On 7/11/2023 1:40 AM, Krzysztof Kozlowski wrote:
>> On 10/07/2023 12:37, Praveenkumar I wrote:
>>> Add TSENS V2 calibration nvmem cells for IPQ5332
>>>
>>> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
>>> ---
>>>   .../bindings/thermal/qcom-tsens.yaml          | 26 +++++++++++++++++--
>>>   1 file changed, 24 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
>>> index 27e9e16e6455..8b7863c3989e 100644
>>> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
>>> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
>>> @@ -91,7 +91,7 @@ properties:
>>>       maxItems: 2
>>>   
>>>     nvmem-cells:
>>> -    oneOf:
>>> +    anyOf:
>>>         - minItems: 1
>>>           maxItems: 2
>>>           description:
>>> @@ -106,9 +106,13 @@ properties:
>>>           description: |
>>>             Reference to nvmem cells for the calibration mode, two calibration
>>>             bases and two cells per each sensor, main and backup copies, plus use_backup cell
>>> +      - maxItems: 17
>>> +        description: |
>>> +          V2 of TSENS, reference to nvmem cells for the calibration mode, two calibration
>>> +          bases and one cell per each sensor
>> I think this is already included in one of the previous entries.
>> Otherwise, are you sure that all new devices will have exactly 17 entries?
> Previous entries does not support TSENS version 2.X.X QFPROM. TSENS V2 
> QFPROM has mode, base0, base1 and s[0-15]+_offset.
> Ideally it should be like,
> - minItems: 4
> - maxItems: 19

I see it covered:
minItems: 5
maxItems: 35

I think 17 is between 5 and 35.

> But dt binding check fails in oneOf / anyOf condition. So added the 
> IPQ5332 properties which is exactly 17.
>>
>>>   
>>>     nvmem-cell-names:
>>> -    oneOf:
>>> +    anyOf:
>>>         - minItems: 1
>>>           items:
>>>             - const: calib
>>> @@ -205,6 +209,24 @@ properties:
>>>             - const: s9_p2_backup
>>>             - const: s10_p1_backup
>>>             - const: s10_p2_backup
>>> +      - items:
>>> +          - const: mode
>>> +          - const: base0
>>> +          - const: base1
>>> +          - const: s0_offset
>>> +          - const: s3_offset
>>> +          - const: s4_offset
>>> +          - const: s5_offset
>>> +          - const: s6_offset
>>> +          - const: s7_offset
>>> +          - const: s8_offset
>>> +          - const: s9_offset
>>> +          - const: s10_offset
>>> +          - const: s11_offset
>>> +          - const: s12_offset
>>> +          - const: s13_offset
>>> +          - const: s14_offset
>>> +          - const: s15_offset
>> Don't introduce new naming style. Existing uses s[0-9]+, without offset
>> suffix. Why this should be different?
> As I mentioned above, s[0-9]+_p1 / s[0-9]+p2 is for TSENS V1. TSENS V2 
> QFPROM layout is different from the existing one.

I know, I did not write about p1/p2.

> I would like to add mode, base0, base1 and 16 patterns 
> '^s[0-15]+_offset$'. But DT binding check is failing in oneOf/ anyOf 
> condintion.

This does not explain why you need different style - this "offset" suffix.

Best regards,
Krzysztof


  reply	other threads:[~2023-07-11  9:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 10:37 [PATCH 0/6] Add IPQ5332 TSENS support Praveenkumar I
2023-07-10 10:37 ` [PATCH 1/6] dt-bindings: thermal: tsens: Add nvmem cells for calibration data Praveenkumar I
2023-07-10 20:10   ` Krzysztof Kozlowski
2023-07-11  9:39     ` Praveenkumar I
2023-07-11  9:52       ` Krzysztof Kozlowski [this message]
2023-07-11 14:13         ` Praveenkumar I
2023-07-13 11:38           ` Krzysztof Kozlowski
2023-07-10 10:37 ` [PATCH 2/6] thermal/drivers/tsens: Add TSENS enable and calibration support for V2 Praveenkumar I
2023-07-10 11:19   ` Dmitry Baryshkov
2023-07-10 11:22     ` Dmitry Baryshkov
2023-07-10 13:24       ` Praveenkumar I
2023-07-10 13:22     ` Praveenkumar I
2023-07-10 15:02       ` Dmitry Baryshkov
2023-07-11  9:19         ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 3/6] dt-bindings: thermal: tsens: Add ipq5332 compatible Praveenkumar I
2023-07-10 20:06   ` Krzysztof Kozlowski
2023-07-11  9:24     ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 4/6] arm64: dts: qcom: ipq5332: Add tsens node Praveenkumar I
2023-07-10 11:21   ` Dmitry Baryshkov
2023-07-10 13:25     ` Praveenkumar I
2023-07-10 20:07   ` Krzysztof Kozlowski
2023-07-11  9:27     ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 5/6] arm64: dts: qcom: ipq5332: Add thermal zone nodes Praveenkumar I
2023-07-10 11:23   ` Dmitry Baryshkov
2023-07-10 12:14     ` Konrad Dybcio
2023-07-10 13:34       ` Praveenkumar I
2023-07-10 13:54         ` Praveenkumar I
2023-07-10 13:30     ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 6/6] thermal/drivers/tsens: Add IPQ5332 support Praveenkumar I
2023-07-10 11:24   ` Dmitry Baryshkov
2023-07-10 13:47     ` Praveenkumar I
2023-07-10 15:03       ` Dmitry Baryshkov
2023-07-11  9:20         ` Praveenkumar I

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=37aa7ae8-206e-3a48-b90d-22d49e86c675@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=quic_ipkumar@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@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;
as well as URLs for NNTP newsgroup(s).