All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: spi: qcom-qspi: Add minItems to interconnect-names
@ 2022-03-26 21:21 Kuldeep Singh
  2022-03-27 19:21 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Kuldeep Singh @ 2022-03-26 21:21 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mark Brown, Rob Herring,
	Mukesh Savaliya, Akash Asthana
  Cc: Rob Herring, linux-arm-msm, linux-spi, devicetree, linux-kernel

Qualcomm QSPI DT spec says interconnects has minimum length 1 and
maximum length 2. Same configuration will be applicable for
interconnect-names. Schema currently depicts interconnects length
correctly but not interconnect-names. It can have a single entry, which
is a valid case yet to be incorporated in the current configuration. The
schema tries to look for 2 names and fail for DTs with a single entry.
Thus, add minItems property to interconnect-names to fix it.

With the change applied, below interconnect-names values are possible:
['qspi-config'], ['qspi-config', 'qspi-memory']

Fixes: 8f9c291558ea ("dt-bindings: spi: Add interconnect binding for QSPI")
Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml
index 055524fe8327..116f3746c1e6 100644
--- a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml
+++ b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml
@@ -49,6 +49,7 @@ properties:
     maxItems: 2
 
   interconnect-names:
+    minItems: 1
     items:
       - const: qspi-config
       - const: qspi-memory
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: spi: qcom-qspi: Add minItems to interconnect-names
  2022-03-26 21:21 [PATCH] dt-bindings: spi: qcom-qspi: Add minItems to interconnect-names Kuldeep Singh
@ 2022-03-27 19:21 ` Krzysztof Kozlowski
  2022-03-28 18:16   ` Kuldeep Singh
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-27 19:21 UTC (permalink / raw)
  To: Kuldeep Singh, Andy Gross, Bjorn Andersson, Mark Brown,
	Rob Herring, Mukesh Savaliya, Akash Asthana
  Cc: Rob Herring, linux-arm-msm, linux-spi, devicetree, linux-kernel

On 26/03/2022 22:21, Kuldeep Singh wrote:
> Qualcomm QSPI DT spec says interconnects has minimum length 1 and
> maximum length 2. Same configuration will be applicable for
> interconnect-names. Schema currently depicts interconnects length
> correctly but not interconnect-names. It can have a single entry, which
> is a valid case yet to be incorporated in the current configuration. The
> schema tries to look for 2 names and fail for DTs with a single entry.
> Thus, add minItems property to interconnect-names to fix it.

Thanks for the patch.

6 sentences which explaining the same, which could be written in one
sentence. In the same time you actually do not explain whether having
one interconnect is correct. You just say what DT spec says about
interconnects, but maybe that's wrong.

So either keep just one sentence or really explain why one or two are
allowed (based on datasheet for example).

> 
> With the change applied, below interconnect-names values are possible:
> ['qspi-config'], ['qspi-config', 'qspi-memory']
> 
> Fixes: 8f9c291558ea ("dt-bindings: spi: Add interconnect binding for QSPI")
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
>  Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.yaml | 1 +
>  1 file changed, 1 insertion(+)


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: spi: qcom-qspi: Add minItems to interconnect-names
  2022-03-27 19:21 ` Krzysztof Kozlowski
@ 2022-03-28 18:16   ` Kuldeep Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Kuldeep Singh @ 2022-03-28 18:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Mark Brown, Rob Herring,
	Mukesh Savaliya, Akash Asthana, Rob Herring, linux-arm-msm,
	linux-spi, devicetree, linux-kernel

On Sun, Mar 27, 2022 at 09:21:34PM +0200, Krzysztof Kozlowski wrote:
> On 26/03/2022 22:21, Kuldeep Singh wrote:
> > Qualcomm QSPI DT spec says interconnects has minimum length 1 and
> > maximum length 2. Same configuration will be applicable for
> > interconnect-names. Schema currently depicts interconnects length
> > correctly but not interconnect-names. It can have a single entry, which
> > is a valid case yet to be incorporated in the current configuration. The
> > schema tries to look for 2 names and fail for DTs with a single entry.
> > Thus, add minItems property to interconnect-names to fix it.
> 
> Thanks for the patch.
> 
> 6 sentences which explaining the same, which could be written in one
> sentence. In the same time you actually do not explain whether having
> one interconnect is correct. You just say what DT spec says about
> interconnects, but maybe that's wrong.

Though commit desscription is subject to personal perspective, but I
also see some duplication here and will submit v2 with a shorter
description.

> 
> So either keep just one sentence or really explain why one or two are
> allowed (based on datasheet for example).

Please see commit 8f9c291558ea, interconnect properties were added by
one of maintainers of qcom-qspi. And it's been sometime this change is
in-tree with no regressions introduced. So, I don't think we should
double check this change. My change simply define minItem constraint to
interconnect-names which is already existing on interconnects.

-Kuldeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-28 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26 21:21 [PATCH] dt-bindings: spi: qcom-qspi: Add minItems to interconnect-names Kuldeep Singh
2022-03-27 19:21 ` Krzysztof Kozlowski
2022-03-28 18:16   ` Kuldeep Singh

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.