2021-12-21 21:25:37

by David Mosberger-Tang

[permalink] [raw]
Subject: [PATCH v7 0/2] wilc1000: Add reset/enable GPIO support to SPI driver

v7:
- Rebase to latest wireless-drivers-next.
v6:
- Convert line comments to block comments.
v5:
- Fix a dt_binding_check error by including
<dt-bindings/gpio/gpio.h> in microchip,wilc1000.yaml.
v4:
- Simplify wilc_wlan_power() by letting gpiod_set_value()
handle NULL gpios.
v3:
- Fix to include correct header file.
- Rename wilc_set_enable() to wilc_wlan_power().
- Use devm_gpiod_get{,_optional}() instead of of_get_named_gpio()
- Parse GPIO pins once at probe time.
v2:
- Split documentation update and driver changes into seprate
patches.

David Mosberger-Tang (2):
wilc1000: Add reset/enable GPIO support to SPI driver
wilc1000: Document enable-gpios and reset-gpios properties

.../net/wireless/microchip,wilc1000.yaml | 19 ++++++
drivers/net/wireless/microchip/wilc1000/spi.c | 62 ++++++++++++++++++-
.../net/wireless/microchip/wilc1000/wlan.c | 2 +-
3 files changed, 79 insertions(+), 4 deletions(-)

--
2.25.1



2021-12-21 21:25:44

by David Mosberger-Tang

[permalink] [raw]
Subject: [PATCH v7 2/2] wilc1000: Document enable-gpios and reset-gpios properties

Add documentation for the ENABLE and RESET GPIOs that may be needed by
wilc1000-spi.

Signed-off-by: David Mosberger-Tang <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../net/wireless/microchip,wilc1000.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml b/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
index 6c35682377e6d..60de78f1bc7b9 100644
--- a/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
@@ -32,6 +32,21 @@ properties:
clock-names:
const: rtc

+ enable-gpios:
+ maxItems: 1
+ description: Used by wilc1000-spi to determine the GPIO line
+ connected to the ENABLE line. If specified, reset-gpios
+ must be specified as well as otherwise the driver cannot
+ ensure the timing required between asserting ENABLE
+ and deasserting RESET. This should be declared as an
+ active-high signal.
+
+ reset-gpios:
+ maxItems: 1
+ description: Used by wilc1000-spi to determine the GPIO line
+ connected to the RESET line. This should be declared as an
+ active-low signal.
+
required:
- compatible
- interrupts
@@ -40,6 +55,8 @@ additionalProperties: false

examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
+
spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -51,6 +68,8 @@ examples:
interrupts = <27 0>;
clocks = <&pck1>;
clock-names = "rtc";
+ enable-gpios = <&pioA 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pioA 6 GPIO_ACTIVE_LOW>;
};
};

--
2.25.1