The rfkill-gpio driver currently only seems to be used for the Broadcom
4752 GPS UART/GPIO device on ACPI systems, but the driver looks generic
enough. It is already mostly prepared for device tree support, this
series only adds binding documentation and adds support for the
"rfkill-gpio" compatible and the renamed "name" -> "label" and
"type" -> "radio-type" properties.
Changes since v1:
- Rename "name" and "type" properties to "label" and "radio-type",
respectively, and adapt the driver.
- Drop reset-gpios property from DT binding.
- Fix some style issues, see individual patches for details.
v1: https://lore.kernel.org/all/[email protected]/T
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Johannes Berg <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Philipp Zabel <[email protected]>
---
Philipp Zabel (2):
dt-bindings: net: Add rfkill-gpio binding
net: rfkill: gpio: add DT support
.../devicetree/bindings/net/rfkill-gpio.yaml | 51 ++++++++++++++++++++++
net/rfkill/rfkill-gpio.c | 20 ++++++++-
2 files changed, 69 insertions(+), 2 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230102-rfkill-gpio-dt-f9a07ef1f036
Best regards,
--
Philipp Zabel <[email protected]>
Add a device tree binding document for GPIO controlled rfkill switches.
The label and radio-type properties correspond to the name and type
properties used for ACPI, respectively. The shutdown-gpios property
is the same as defined for ACPI.
Signed-off-by: Philipp Zabel <[email protected]>
---
Changes since v1:
- Drop quotes from $id and $schema (Krzysztof)
- Use generic label property (Rob, Krzysztof)
- Rename type property to radio-type (Rob)
- Reorder list of radio types alphabetically (Krzysztof)
- Drop reset-gpios property (Rob, Krzysztof)
- Use generic node name in example (Rob, Krzysztof)
---
.../devicetree/bindings/net/rfkill-gpio.yaml | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
new file mode 100644
index 000000000000..9630c8466fac
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
@@ -0,0 +1,51 @@
+# 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 <[email protected]>
+ - Philipp Zabel <[email protected]>
+
+properties:
+ compatible:
+ const: rfkill-gpio
+
+ label:
+ description: rfkill switch name, defaults to node name
+
+ radio-type:
+ description: rfkill radio type
+ enum:
+ - bluetooth
+ - fm
+ - gps
+ - nfc
+ - ultrawideband
+ - wimax
+ - wlan
+ - wwan
+
+ shutdown-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - radio-type
+ - shutdown-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ rfkill {
+ compatible = "rfkill-gpio";
+ label = "rfkill-pcie-wlan";
+ radio-type = "wlan";
+ shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
+ };
--
2.30.2
On Mon, 02 Jan 2023 18:29:33 +0100, Philipp Zabel wrote:
> Add a device tree binding document for GPIO controlled rfkill switches.
> The label and radio-type properties correspond to the name and type
> properties used for ACPI, respectively. The shutdown-gpios property
> is the same as defined for ACPI.
>
> Signed-off-by: Philipp Zabel <[email protected]>
> ---
> Changes since v1:
> - Drop quotes from $id and $schema (Krzysztof)
> - Use generic label property (Rob, Krzysztof)
> - Rename type property to radio-type (Rob)
> - Reorder list of radio types alphabetically (Krzysztof)
> - Drop reset-gpios property (Rob, Krzysztof)
> - Use generic node name in example (Rob, Krzysztof)
> ---
> .../devicetree/bindings/net/rfkill-gpio.yaml | 51 ++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
Reviewed-by: Rob Herring <[email protected]>