Skip to contentSkip to conversation

dt-bindings: power: reset: add yaml bindings for LinkStation power off

PATCH Superseded Daniel González Cabanelas 2 participants 4 messages Jun 13, 2020 – Jul 13, 2020

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 dt-bindings: power: reset: add yaml bindings for LinkStation power off

Add Linkstation poweroff bindings documentation.

---
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
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +35 -0
new file mode 100644
index 0000000000..8845333ca4
@@ -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 <[email protected]>
+
+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";
+    };
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 21 lines · Daniel González Cabanelas

Add Linkstation poweroff bindings documentation.

---
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
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +0 -0
new file mode 100644
index 0000000000..8845333ca4

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +1 -0
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)

As I said before:

GPL-2.0-only

Quoted 24 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +24 -0
+%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 <[email protected]>
+
+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
+

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 35

Quoted 10 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +10 -0
+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

#2 lore raw

Hi Rob,

Quoted 27 lines · Rob Herring
Quoted 21 lines · Daniel González Cabanelas

Add Linkstation poweroff bindings documentation.

---
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
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +0 -0
new file mode 100644
index 0000000000..8845333ca4

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +1 -0
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)

As I said before:

Quoted 1 line

GPL-2.0-only

Sorry, it was a copy paste error.

Quoted 30 lines
Quoted 30 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +29 -0
+%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 <[email protected]>
+
+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
+
Quoted 9 lines

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 35

Quoted 5 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +5 -0
+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.

Quoted 2 lines

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

Quoted 2 lines

Rob

maintainer
#3 lore raw
Quoted 73 lines · Daniel González Cabanelas

Hi Rob,

Quoted 27 lines · Rob Herring
Quoted 21 lines · Daniel González Cabanelas

Add Linkstation poweroff bindings documentation.

---
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
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +0 -0
new file mode 100644
index 0000000000..8845333ca4

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +1 -0
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)

As I said before:

Quoted 1 line

GPL-2.0-only

Sorry, it was a copy paste error.

Quoted 30 lines
Quoted 30 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +29 -0
+%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 <[email protected]>
+
+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
+
Quoted 9 lines

Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml line 35

Quoted 5 lines
Documentation/devicetree/bindings/power/reset/linkstation-poweroff.yaml new file +5 -0
+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.

Quoted 2 lines

Then I don't need any binding?, and therefore if I understood correctly this patch isn't required.

Right.

Quoted 4 lines
Quoted 2 lines

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.

Quoted 8 lines

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

Regards
Daniel

Quoted 2 lines

Rob