diff mbox

[2/3] dt-bindings: etnaviv: change clocks to be optional

Message ID 20180119120634.22856-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach Jan. 19, 2018, 12:06 p.m. UTC
While the clocks were documented as required, the driver always treated them
as optional and there are existing Marvell Dove DTs, which would break if
changed to required. Accept reality and document the clocks as optional.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 .../devicetree/bindings/display/etnaviv/etnaviv-drm.txt        | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Rob Herring Jan. 22, 2018, 4:28 p.m. UTC | #1
On Fri, Jan 19, 2018 at 6:06 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> While the clocks were documented as required, the driver always treated them
> as optional and there are existing Marvell Dove DTs, which would break if
> changed to required. Accept reality and document the clocks as optional.

The fact that clocks are optional for a driver doesn't mean they are
optional for the binding. Now they could be optional because you have
power-domains and all clock management is done within the power domain
(though that too is driver specifics leaking into the binding because
power domain has come to mean power management domain).

>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  .../devicetree/bindings/display/etnaviv/etnaviv-drm.txt        | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
> index c6f4e023c34a..f28aa5735f4f 100644
> --- a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
> +++ b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
> @@ -30,16 +30,16 @@ Required properties:
>  - reg: should be register base and length as documented in the
>    datasheet
>  - interrupts: Should contain the cores interrupt line
> +
> +Optional properties:
> +- power-domains: a power domain consumer specifier according to
> +  Documentation/devicetree/bindings/power/power_domain.txt
>  - clocks: should contain one clock for entry in clock-names
>    see Documentation/devicetree/bindings/clock/clock-bindings.txt
>  - clock-names:
>     - "bus":    AXI/register clock
>     - "core":   GPU core clock
> -   - "shader": Shader clock (only required if GPU has feature PIPE_3D)
> -
> -Optional properties:
> -- power-domains: a power domain consumer specifier according to
> -  Documentation/devicetree/bindings/power/power_domain.txt
> +   - "shader": Shader clock (only if GPU has feature PIPE_3D)

"required" is still appropriate here because it is "if you have
optional clocks, then it is required if gpu has PIPE_3D").

Rob
Lucas Stach Jan. 22, 2018, 4:36 p.m. UTC | #2
Am Montag, den 22.01.2018, 10:28 -0600 schrieb Rob Herring:
> On Fri, Jan 19, 2018 at 6:06 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> > While the clocks were documented as required, the driver always
> > treated them
> > as optional and there are existing Marvell Dove DTs, which would
> > break if
> > changed to required. Accept reality and document the clocks as
> > optional.
> 
> The fact that clocks are optional for a driver doesn't mean they are
> optional for the binding. Now they could be optional because you have
> power-domains and all clock management is done within the power
> domain
> (though that too is driver specifics leaking into the binding because
> power domain has come to mean power management domain).

So you prefer the binding to stay as-is and accept the Dove DTs as non-
compliant to the bindings, but still okay? That's fine with me and I'll
drop that patch in this case.

Regards,
Lucas
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
index c6f4e023c34a..f28aa5735f4f 100644
--- a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
+++ b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt
@@ -30,16 +30,16 @@  Required properties:
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain the cores interrupt line
+
+Optional properties:
+- power-domains: a power domain consumer specifier according to
+  Documentation/devicetree/bindings/power/power_domain.txt
 - clocks: should contain one clock for entry in clock-names
   see Documentation/devicetree/bindings/clock/clock-bindings.txt
 - clock-names:
    - "bus":    AXI/register clock
    - "core":   GPU core clock
-   - "shader": Shader clock (only required if GPU has feature PIPE_3D)
-
-Optional properties:
-- power-domains: a power domain consumer specifier according to
-  Documentation/devicetree/bindings/power/power_domain.txt
+   - "shader": Shader clock (only if GPU has feature PIPE_3D)
 
 example: