diff mbox series

[2/2] staging: wilc1000: use single DT binding documentation for SDIO and SPI

Message ID 20200306144400.4269-3-ajay.kathat@microchip.com (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series staging: wilc1000: handle DT binding documentation comments | expand

Commit Message

Ajay Singh March 6, 2020, 2:44 p.m. UTC
From: Ajay Singh <ajay.kathat@microchip.com>

Merged the DT binding documentation of SDIO and SPI into a single file.
Removed documentation for some of the properties which are not required
and handled review comments received in [1] & [2].

[1]. https://lore.kernel.org/linux-wireless/20200303020230.GA15543@bogus
[2]. https://lore.kernel.org/linux-wireless/20200303015558.GA6876@bogus

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 .../wilc1000/microchip,wilc1000,sdio.yaml     | 68 -------------------
 ...c1000,spi.yaml => microchip,wilc1000.yaml} | 44 ++++++++----
 drivers/staging/wilc1000/sdio.c               |  4 +-
 drivers/staging/wilc1000/spi.c                |  2 +-
 4 files changed, 34 insertions(+), 84 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/microchip,wilc1000,sdio.yaml
 rename drivers/staging/wilc1000/{microchip,wilc1000,spi.yaml => microchip,wilc1000.yaml} (53%)
diff mbox series

Patch

diff --git a/drivers/staging/wilc1000/microchip,wilc1000,sdio.yaml b/drivers/staging/wilc1000/microchip,wilc1000,sdio.yaml
deleted file mode 100644
index 9df7327bc668..000000000000
--- a/drivers/staging/wilc1000/microchip,wilc1000,sdio.yaml
+++ /dev/null
@@ -1,68 +0,0 @@ 
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/net/wireless/microchip,wilc1000,sdio.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Microchip WILC wireless SDIO devicetree bindings
-
-maintainers:
-  - Adham Abozaeid <adham.abozaeid@microchip.com>
-  - Ajay Singh <ajay.kathat@microchip.com>
-
-description:
-  The wilc1000 chips can be connected via SDIO. The node is used to
-  specify child node to the SDIO controller that connects the device
-  to the system.
-
-properties:
-  compatible:
-    const: microchip,wilc1000-sdio
-
-  interrupts:
-    maxItems: 1
-
-  reg:
-    description: Slot ID used in the controller.
-    maxItems: 1
-
-  clocks:
-    description: phandle to the clock connected on rtc clock line.
-    maxItems: 1
-
-  bus-width:
-    description: The number of data lines wired up the slot.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - enum: [1, 4, 8]
-      - default: 1
-
-required:
-  - compatible
-  - interrupts
-  - reg
-
-examples:
-  - |
-    mmc1: mmc@fc000000 {
-      #address-cells = <1>;
-      #size-cells = <0>;
-      pinctrl-names = "default";
-      pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>;
-      non-removable;
-      vmmc-supply = <&vcc_mmc1_reg>;
-      vqmmc-supply = <&vcc_3v3_reg>;
-      status = "okay";
-      wilc_sdio@0 {
-        compatible = "microchip,wilc1000-sdio";
-        interrupt-parent = <&pioC>;
-        interrupts = <27 0>;
-          reg = <0>;
-          clocks = <&pck1>;
-          clock-names = "rtc_clk";
-          assigned-clocks = <&pck1>;
-          assigned-clock-rates = <32768>;
-          status = "okay";
-          bus-width = <4>;
-        };
-    };
diff --git a/drivers/staging/wilc1000/microchip,wilc1000,spi.yaml b/drivers/staging/wilc1000/microchip,wilc1000.yaml
similarity index 53%
rename from drivers/staging/wilc1000/microchip,wilc1000,spi.yaml
rename to drivers/staging/wilc1000/microchip,wilc1000.yaml
index dd5e8da1f562..a1914449ad07 100644
--- a/drivers/staging/wilc1000/microchip,wilc1000,spi.yaml
+++ b/drivers/staging/wilc1000/microchip,wilc1000.yaml
@@ -1,22 +1,22 @@ 
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/net/wireless/microchip,wilc1000,spi.yaml#
+$id: http://devicetree.org/schemas/net/wireless/microchip,wilc1000.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Microchip WILC wireless SPI devicetree bindings
+title: Microchip WILC wireless devicetree bindings
 
 maintainers:
   - Adham Abozaeid <adham.abozaeid@microchip.com>
   - Ajay Singh <ajay.kathat@microchip.com>
 
 description:
-  The wilc1000 chips can be connected via SPI. This document describes
-  the binding for the SPI connected module.
+  The wilc1000 chips can be connected via SPI or SDIO. This document
+  describes the binding to connect wilc devices.
 
 properties:
   compatible:
-    const: microchip,wilc1000-spi
+    const: microchip,wilc1000
 
   spi-max-frequency:
     description: Maximum SPI clocking speed of device in Hz.
@@ -33,9 +33,11 @@  properties:
     description: phandle to the clock connected on rtc clock line.
     maxItems: 1
 
+  clock-names:
+    const: rtc
+
 required:
   - compatible
-  - spi-max-frequency
   - reg
   - interrupts
 
@@ -45,17 +47,33 @@  examples:
       #address-cells = <1>;
       #size-cells = <0>;
       cs-gpios = <&pioB 21 0>;
-      status = "okay";
-      wilc_spi@0 {
-        compatible = "microchip,wilc1000-spi";
+      wifi@0 {
+        compatible = "microchip,wilc1000";
         spi-max-frequency = <48000000>;
         reg = <0>;
         interrupt-parent = <&pioC>;
         interrupts = <27 0>;
         clocks = <&pck1>;
-        clock-names = "rtc_clk";
-        assigned-clocks = <&pck1>;
-        assigned-clock-rates = <32768>;
-        status = "okay";
+        clock-names = "rtc";
+      };
+    };
+
+  - |
+    mmc1: mmc@fc000000 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      pinctrl-names = "default";
+      pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>;
+      non-removable;
+      vmmc-supply = <&vcc_mmc1_reg>;
+      vqmmc-supply = <&vcc_3v3_reg>;
+      bus-width = <4>;
+      wifi@0 {
+        compatible = "microchip,wilc1000";
+        reg = <0>;
+        interrupt-parent = <&pioC>;
+        interrupts = <27 0>;
+        clocks = <&pck1>;
+        clock-names = "rtc";
       };
     };
diff --git a/drivers/staging/wilc1000/sdio.c b/drivers/staging/wilc1000/sdio.c
index 44b426874c1b..36eb589263bf 100644
--- a/drivers/staging/wilc1000/sdio.c
+++ b/drivers/staging/wilc1000/sdio.c
@@ -150,7 +150,7 @@  static int wilc_sdio_probe(struct sdio_func *func,
 	wilc->bus_data = sdio_priv;
 	wilc->dev = &func->dev;
 
-	wilc->rtc_clk = devm_clk_get(&func->card->dev, "rtc_clk");
+	wilc->rtc_clk = devm_clk_get(&func->card->dev, "rtc");
 	if (PTR_ERR_OR_ZERO(wilc->rtc_clk) == -EPROBE_DEFER)
 		return -EPROBE_DEFER;
 	else if (!IS_ERR(wilc->rtc_clk))
@@ -997,7 +997,7 @@  static int wilc_sdio_resume(struct device *dev)
 }
 
 static const struct of_device_id wilc_of_match[] = {
-	{ .compatible = "microchip,wilc1000-sdio", },
+	{ .compatible = "microchip,wilc1000", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, wilc_of_match);
diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
index 852f318a86f0..d77582c55326 100644
--- a/drivers/staging/wilc1000/spi.c
+++ b/drivers/staging/wilc1000/spi.c
@@ -189,7 +189,7 @@  static int wilc_bus_remove(struct spi_device *spi)
 }
 
 static const struct of_device_id wilc_of_match[] = {
-	{ .compatible = "microchip,wilc1000-spi", },
+	{ .compatible = "microchip,wilc1000", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, wilc_of_match);