All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off
@ 2020-06-13 10:26 Daniel González Cabanelas
  2020-07-13 18:36 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel González Cabanelas @ 2020-06-13 10:26 UTC (permalink / raw)
  To: linux-pm; +Cc: sre, robh+dt, devicetree

Add Linkstation poweroff bindings documentation. 

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
---
Changes in v3:
  - "phy-handle,intn" property deleted. Now autodetection used.
  - Cosmetic changes
Changes in v2:
  - Changed the required properties and description to adjust to the new
    driver now enabling the WoL feature on the device.

 .../power/reset/linkstation-poweroff.yaml     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml

diff --git a/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
new file mode 100644
index 0000000000..8845333ca4
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/linkstation-poweroff.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Buffalo Linkstation poweroff Binding
+
+maintainers:
+  - Daniel González Cabanelas <dgcbueu@gmail.com>
+
+description: |
+  Some Buffalo LinkStations (ARM MVEBU boards) use an output pin at the ethernet
+  PHY (LED2/INTn) to inform the board if the power off operation must be performed
+  at restart time. This pin is ORed with the power switch and allows the WOL
+  function to be also used.
+
+  When the power-off handler is called, the ethernet PHY INTn ouptut is set to
+  LOW state. If the restart command is executed then the PHY INTn output is
+  forced to HIGH state.
+
+properties:
+  compatible:
+    const: linkstation,power-off
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    poweroff {
+        compatible = "linkstation,power-off";
+    };
-- 
2.27.0





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

* Re: [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off
  2020-06-13 10:26 [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off Daniel González Cabanelas
@ 2020-07-13 18:36 ` Rob Herring
  2020-07-13 19:54   ` Daniel González Cabanelas
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2020-07-13 18:36 UTC (permalink / raw)
  To: Daniel González Cabanelas; +Cc: linux-pm, sre, devicetree

On Sat, Jun 13, 2020 at 12:26:56PM +0200, Daniel González Cabanelas wrote:
> Add Linkstation poweroff bindings documentation. 
> 
> Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
> ---
> Changes in v3:
>   - "phy-handle,intn" property deleted. Now autodetection used.
>   - Cosmetic changes
> Changes in v2:
>   - Changed the required properties and description to adjust to the new
>     driver now enabling the WoL feature on the device.
> 
>  .../power/reset/linkstation-poweroff.yaml     | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> new file mode 100644
> index 0000000000..8845333ca4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> @@ -0,0 +1,35 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)

As I said before:

GPL-2.0-only

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/linkstation-poweroff.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Buffalo Linkstation poweroff Binding
> +
> +maintainers:
> +  - Daniel González Cabanelas <dgcbueu@gmail.com>
> +
> +description: |
> +  Some Buffalo LinkStations (ARM MVEBU boards) use an output pin at the ethernet
> +  PHY (LED2/INTn) to inform the board if the power off operation must be performed
> +  at restart time. This pin is ORed with the power switch and allows the WOL
> +  function to be also used.
> +
> +  When the power-off handler is called, the ethernet PHY INTn ouptut is set to
> +  LOW state. If the restart command is executed then the PHY INTn output is
> +  forced to HIGH state.
> +
> +properties:
> +  compatible:
> +    const: linkstation,power-off
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    poweroff {
> +        compatible = "linkstation,power-off";
> +    };

This is not what I was suggesting in the last version. You don't need a 
binding for this. Use the root node compatible string.

Your driver initcall needs to check the root compatible and create a 
platform device if it matches.

Rob

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

* Re: [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off
  2020-07-13 18:36 ` Rob Herring
@ 2020-07-13 19:54   ` Daniel González Cabanelas
  2020-07-13 20:07     ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel González Cabanelas @ 2020-07-13 19:54 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-pm, Sebastian Reichel, devicetree

Hi Rob,

El lun., 13 jul. 2020 a las 20:36, Rob Herring (<robh@kernel.org>) escribió:
>
> On Sat, Jun 13, 2020 at 12:26:56PM +0200, Daniel González Cabanelas wrote:
> > Add Linkstation poweroff bindings documentation.
> >
> > Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
> > ---
> > Changes in v3:
> >   - "phy-handle,intn" property deleted. Now autodetection used.
> >   - Cosmetic changes
> > Changes in v2:
> >   - Changed the required properties and description to adjust to the new
> >     driver now enabling the WoL feature on the device.
> >
> >  .../power/reset/linkstation-poweroff.yaml     | 35 +++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> > new file mode 100644
> > index 0000000000..8845333ca4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> > @@ -0,0 +1,35 @@
> > +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
>
> As I said before:
>
> GPL-2.0-only
Sorry, it was a copy paste error.

>
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/power/reset/linkstation-poweroff.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Buffalo Linkstation poweroff Binding
> > +
> > +maintainers:
> > +  - Daniel González Cabanelas <dgcbueu@gmail.com>
> > +
> > +description: |
> > +  Some Buffalo LinkStations (ARM MVEBU boards) use an output pin at the ethernet
> > +  PHY (LED2/INTn) to inform the board if the power off operation must be performed
> > +  at restart time. This pin is ORed with the power switch and allows the WOL
> > +  function to be also used.
> > +
> > +  When the power-off handler is called, the ethernet PHY INTn ouptut is set to
> > +  LOW state. If the restart command is executed then the PHY INTn output is
> > +  forced to HIGH state.
> > +
> > +properties:
> > +  compatible:
> > +    const: linkstation,power-off
> > +
> > +required:
> > +  - compatible
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    poweroff {
> > +        compatible = "linkstation,power-off";
> > +    };
>
> This is not what I was suggesting in the last version. You don't need a
> binding for this. Use the root node compatible string.
>
Then I don't need any binding?, and therefore if I understood
correctly this patch isn't required.

> Your driver initcall needs to check the root compatible and create a
> platform device if it matches.

Are you suggesting to validate the driver only for one specific device?

BTW the driver was already checked by Sebastian Reichel and nothing
wrong was found.

Regards
Daniel

>
> Rob

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

* Re: [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off
  2020-07-13 19:54   ` Daniel González Cabanelas
@ 2020-07-13 20:07     ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-07-13 20:07 UTC (permalink / raw)
  To: Daniel González Cabanelas
  Cc: open list:THERMAL, Sebastian Reichel, devicetree

On Mon, Jul 13, 2020 at 1:54 PM Daniel González Cabanelas
<dgcbueu@gmail.com> wrote:
>
> Hi Rob,
>
> El lun., 13 jul. 2020 a las 20:36, Rob Herring (<robh@kernel.org>) escribió:
> >
> > On Sat, Jun 13, 2020 at 12:26:56PM +0200, Daniel González Cabanelas wrote:
> > > Add Linkstation poweroff bindings documentation.
> > >
> > > Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
> > > ---
> > > Changes in v3:
> > >   - "phy-handle,intn" property deleted. Now autodetection used.
> > >   - Cosmetic changes
> > > Changes in v2:
> > >   - Changed the required properties and description to adjust to the new
> > >     driver now enabling the WoL feature on the device.
> > >
> > >  .../power/reset/linkstation-poweroff.yaml     | 35 +++++++++++++++++++
> > >  1 file changed, 35 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> > > new file mode 100644
> > > index 0000000000..8845333ca4
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml
> > > @@ -0,0 +1,35 @@
> > > +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
> >
> > As I said before:
> >
> > GPL-2.0-only
> Sorry, it was a copy paste error.
>
> >
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/power/reset/linkstation-poweroff.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Buffalo Linkstation poweroff Binding
> > > +
> > > +maintainers:
> > > +  - Daniel González Cabanelas <dgcbueu@gmail.com>
> > > +
> > > +description: |
> > > +  Some Buffalo LinkStations (ARM MVEBU boards) use an output pin at the ethernet
> > > +  PHY (LED2/INTn) to inform the board if the power off operation must be performed
> > > +  at restart time. This pin is ORed with the power switch and allows the WOL
> > > +  function to be also used.
> > > +
> > > +  When the power-off handler is called, the ethernet PHY INTn ouptut is set to
> > > +  LOW state. If the restart command is executed then the PHY INTn output is
> > > +  forced to HIGH state.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: linkstation,power-off
> > > +
> > > +required:
> > > +  - compatible
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    poweroff {
> > > +        compatible = "linkstation,power-off";
> > > +    };
> >
> > This is not what I was suggesting in the last version. You don't need a
> > binding for this. Use the root node compatible string.
> >
> Then I don't need any binding?, and therefore if I understood
> correctly this patch isn't required.

Right.

> > Your driver initcall needs to check the root compatible and create a
> > platform device if it matches.
>
> Are you suggesting to validate the driver only for one specific device?

No, you can have a match table with as many entries as you need.

> BTW the driver was already checked by Sebastian Reichel and nothing
> wrong was found.
>
> Regards
> Daniel
>
> >
> > Rob

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

end of thread, other threads:[~2020-07-13 20:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 10:26 [PATCH v3 2/2] dt-bindings: power: reset: add yaml bindings for LinkStation power off Daniel González Cabanelas
2020-07-13 18:36 ` Rob Herring
2020-07-13 19:54   ` Daniel González Cabanelas
2020-07-13 20:07     ` Rob Herring

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.