linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties
@ 2021-02-12 16:38 ` Krzysztof Kozlowski
  2021-02-15  9:01   ` Marek Szyprowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2021-02-12 16:38 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Krzysztof Kozlowski, Lee Jones, Mark Brown,
	linux-iio, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

Add common properties appearing in DTSes (assigned-clocks and similar)
to fix dtbs_check warnings like:

  arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
    adc@126c0000: assigned-clock-rates: [[6000000]] is not of type 'object'
  arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
    adc@126c0000: assigned-clocks: [[7, 238]] is not of type 'object'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../bindings/iio/adc/samsung,exynos-adc.yaml         | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index c65921e66dc1..ce03132f8ebc 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -27,6 +27,18 @@ properties:
   reg:
     maxItems: 1
 
+  assigned-clocks:
+    minItems: 1
+    maxItems: 3
+
+  assigned-clock-parents:
+    minItems: 1
+    maxItems: 3
+
+  assigned-clock-rates:
+    minItems: 1
+    maxItems: 3
+
   clocks:
     description:
       Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
-- 
2.25.1


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

* Re: [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties
  2021-02-12 16:38 ` [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties Krzysztof Kozlowski
@ 2021-02-15  9:01   ` Marek Szyprowski
  2021-02-15  9:29     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Szyprowski @ 2021-02-15  9:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Rob Herring, Lee Jones, Mark Brown,
	linux-iio, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

Hi Krzysztof,

On 12.02.2021 17:38, Krzysztof Kozlowski wrote:
> Add common properties appearing in DTSes (assigned-clocks and similar)
> to fix dtbs_check warnings like:
>
>    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
>      adc@126c0000: assigned-clock-rates: [[6000000]] is not of type 'object'
>    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
>      adc@126c0000: assigned-clocks: [[7, 238]] is not of type 'object'

Does it mean that assigned-clocks related properties have to be added to 
almost all bindings? IMHO this is an over-engineering and this has to be 
handled somewhere else...

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>   .../bindings/iio/adc/samsung,exynos-adc.yaml         | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index c65921e66dc1..ce03132f8ebc 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -27,6 +27,18 @@ properties:
>     reg:
>       maxItems: 1
>   
> +  assigned-clocks:
> +    minItems: 1
> +    maxItems: 3
> +
> +  assigned-clock-parents:
> +    minItems: 1
> +    maxItems: 3
> +
> +  assigned-clock-rates:
> +    minItems: 1
> +    maxItems: 3
> +
>     clocks:
>       description:
>         Phandle to ADC bus clock. For Exynos3250 additional clock is needed.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


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

* Re: [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties
  2021-02-15  9:01   ` Marek Szyprowski
@ 2021-02-15  9:29     ` Krzysztof Kozlowski
  2021-03-05 20:41       ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2021-02-15  9:29 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Lee Jones, Mark Brown, linux-iio, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On Mon, Feb 15, 2021 at 10:01:48AM +0100, Marek Szyprowski wrote:
> Hi Krzysztof,
> 
> On 12.02.2021 17:38, Krzysztof Kozlowski wrote:
> > Add common properties appearing in DTSes (assigned-clocks and similar)
> > to fix dtbs_check warnings like:
> >
> >    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
> >      adc@126c0000: assigned-clock-rates: [[6000000]] is not of type 'object'
> >    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
> >      adc@126c0000: assigned-clocks: [[7, 238]] is not of type 'object'
> 
> Does it mean that assigned-clocks related properties have to be added to 
> almost all bindings?

To my understanding: yes, and we already added it to multiple schemas.

> IMHO this is an over-engineering and this has to be 
> handled somewhere else...

Would have to be made a part of the core schema (just like pinctrl nodes
etc).

Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties
  2021-02-15  9:29     ` Krzysztof Kozlowski
@ 2021-03-05 20:41       ` Rob Herring
  2021-03-07 11:44         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2021-03-05 20:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Marek Szyprowski, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Lee Jones, Mark Brown, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

On Mon, Feb 15, 2021 at 10:29:15AM +0100, Krzysztof Kozlowski wrote:
> On Mon, Feb 15, 2021 at 10:01:48AM +0100, Marek Szyprowski wrote:
> > Hi Krzysztof,
> > 
> > On 12.02.2021 17:38, Krzysztof Kozlowski wrote:
> > > Add common properties appearing in DTSes (assigned-clocks and similar)
> > > to fix dtbs_check warnings like:
> > >
> > >    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
> > >      adc@126c0000: assigned-clock-rates: [[6000000]] is not of type 'object'
> > >    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
> > >      adc@126c0000: assigned-clocks: [[7, 238]] is not of type 'object'
> > 
> > Does it mean that assigned-clocks related properties have to be added to 
> > almost all bindings?
> 
> To my understanding: yes, and we already added it to multiple schemas.
> 
> > IMHO this is an over-engineering and this has to be 
> > handled somewhere else...
> 
> Would have to be made a part of the core schema (just like pinctrl nodes
> etc).

That's the case now. It's contingent on having a 'clocks' property in 
the node.

Rob

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

* Re: [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties
  2021-03-05 20:41       ` Rob Herring
@ 2021-03-07 11:44         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2021-03-07 11:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Marek Szyprowski, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Lee Jones, Mark Brown, linux-iio,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel

On 05/03/2021 21:41, Rob Herring wrote:
> On Mon, Feb 15, 2021 at 10:29:15AM +0100, Krzysztof Kozlowski wrote:
>> On Mon, Feb 15, 2021 at 10:01:48AM +0100, Marek Szyprowski wrote:
>>> Hi Krzysztof,
>>>
>>> On 12.02.2021 17:38, Krzysztof Kozlowski wrote:
>>>> Add common properties appearing in DTSes (assigned-clocks and similar)
>>>> to fix dtbs_check warnings like:
>>>>
>>>>    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
>>>>      adc@126c0000: assigned-clock-rates: [[6000000]] is not of type 'object'
>>>>    arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml:
>>>>      adc@126c0000: assigned-clocks: [[7, 238]] is not of type 'object'
>>>
>>> Does it mean that assigned-clocks related properties have to be added to 
>>> almost all bindings?
>>
>> To my understanding: yes, and we already added it to multiple schemas.
>>
>>> IMHO this is an over-engineering and this has to be 
>>> handled somewhere else...
>>
>> Would have to be made a part of the core schema (just like pinctrl nodes
>> etc).
> 
> That's the case now. It's contingent on having a 'clocks' property in 
> the node.

Do I understand correctly: with new dtschema my patch is not needed anymore?

Best regards,
Krzysztof

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

end of thread, other threads:[~2021-03-07 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210212164148eucas1p2ab09436a82d50161ff1a9fc1a169f7d7@eucas1p2.samsung.com>
2021-02-12 16:38 ` [PATCH] dt-bindings: iio: samsung,exynos-adc: add common clock properties Krzysztof Kozlowski
2021-02-15  9:01   ` Marek Szyprowski
2021-02-15  9:29     ` Krzysztof Kozlowski
2021-03-05 20:41       ` Rob Herring
2021-03-07 11:44         ` Krzysztof Kozlowski

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).