[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241104153727.GA192461-robh@kernel.org>
Date: Mon, 4 Nov 2024 09:37:27 -0600
From: Rob Herring <robh@...nel.org>
To: Théo Lebrun <theo.lebrun@...tlin.com>
Cc: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Grégory Clement <gregory.clement@...tlin.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-mips@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 01/13] dt-bindings: soc: mobileye: set `#clock-cells =
<1>` for all compatibles
On Thu, Oct 31, 2024 at 04:52:51PM +0100, Théo Lebrun wrote:
> Some compatibles expose a single clock. For those, we used to let them
> using `#clock-cells = <0>` (ie <&olb> reference rather than <&olb 0>).
>
> Switch away from that: enforce a cell for all compatibles. This is more
> straight forward, and avoids devicetree changes whenever a compatible
> goes from exposing a single clock to multiple ones.
Your reasoning is flawed. Changing #clock-cells is an ABI break. So you
should only be changing this if it was just wrong. And if it's not wrong
in some cases, you shouldn't be changing those. The h/w either has 1
clock or multiple and #clocks-cells should match.
>
> Side benefit: dt-bindings is simpler.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
> ---
> .../bindings/soc/mobileye/mobileye,eyeq5-olb.yaml | 24 +---------------------
> 1 file changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
> index f7e606d45ebcfc46ffe076e23a2ed514bfff9b8f..6d11472ba5a704d5d20f43776e5867f507a39242 100644
> --- a/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
> +++ b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml
> @@ -41,9 +41,7 @@ properties:
> enum: [ 1, 2 ]
>
> '#clock-cells':
> - description:
> - Cell is clock index. Optional if compatible has a single clock.
> - enum: [ 0, 1 ]
> + const: 1
>
> clocks:
> maxItems: 1
> @@ -312,26 +310,6 @@ allOf:
> properties:
> '#reset-cells': false
>
> - # Compatibles exposing a single clock.
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - mobileye,eyeq6h-central-olb
> - - mobileye,eyeq6h-east-olb
> - - mobileye,eyeq6h-west-olb
> - - mobileye,eyeq6h-ddr0-olb
> - - mobileye,eyeq6h-ddr1-olb
> - then:
> - properties:
> - '#clock-cells':
> - const: 0
> - else:
> - properties:
> - '#clock-cells':
> - const: 1
> -
> # Only EyeQ5 has pinctrl in OLB.
> - if:
> not:
>
> --
> 2.47.0
>
Powered by blists - more mailing lists