devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding
@ 2022-12-21 10:48 Philipp Zabel
  2022-12-21 10:48 ` [PATCH 2/2] net: rfkill: gpio: add DT support Philipp Zabel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philipp Zabel @ 2022-12-21 10:48 UTC (permalink / raw)
  To: Johannes Berg
  Cc: netdev, devicetree, linux-kernel, linux-wireless, kernel,
	Philipp Zabel

Add a device tree binding document for GPIO controlled rfkill switches.
The name, type, shutdown-gpios and reset-gpios properties are the same
as defined for ACPI.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 .../devicetree/bindings/net/rfkill-gpio.yaml  | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/rfkill-gpio.yaml

diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
new file mode 100644
index 000000000000..6e62e6c96456
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/net/rfkill-gpio.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: GPIO controlled rfkill switch
+
+maintainers:
+  - Johannes Berg <johannes@sipsolutions.net>
+  - Philipp Zabel <p.zabel@pengutronix.de>
+
+properties:
+  compatible:
+    const: rfkill-gpio
+
+  name:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: rfkill switch name, defaults to node name
+
+  type:
+    description: rfkill radio type
+    enum:
+      - wlan
+      - bluetooth
+      - ultrawideband
+      - wimax
+      - wwan
+      - gps
+      - fm
+      - nfc
+
+  shutdown-gpios:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - type
+
+oneOf:
+  - required:
+      - shutdown-gpios
+  - required:
+      - reset-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    rfkill-pcie-wlan {
+        compatible = "rfkill-gpio";
+        name = "rfkill-pcie-wlan";
+        type = "wlan";
+        shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
+    };
-- 
2.30.2


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

end of thread, other threads:[~2023-01-02 17:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21 10:48 [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding Philipp Zabel
2022-12-21 10:48 ` [PATCH 2/2] net: rfkill: gpio: add DT support Philipp Zabel
2022-12-22 10:32   ` Krzysztof Kozlowski
2022-12-21 14:45 ` [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding Rob Herring
2022-12-21 15:36   ` Philipp Zabel
2022-12-22 10:32     ` Krzysztof Kozlowski
2022-12-22 10:20 ` Krzysztof Kozlowski
2023-01-02 17:40   ` Philipp Zabel

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