[OpenWrt-Devel,6/7] ath79: WNR2200: use gpio_hog instead of gpio-export for USB power
diff mbox series

Message ID 20190806130106.0d15cc51@kosmio.komorska
State New
Headers show
Series
  • ath79: add support for some Netgear WNR routers
Related show

Commit Message

Michal Cieslakiewicz Aug. 6, 2019, 11:01 a.m. UTC
To follow new best practice for DTS files, this patch changes
definition for GPIO pin 4 on Wifi chip (USB power control) from
'gpio-export' to 'gpio_hog'. Tested and confirmed to work.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
---
 .../linux/ath79/dts/ar7241_netgear_wnr2200.dts  | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

Comments

Adrian Schmutzler Aug. 6, 2019, 1:03 p.m. UTC | #1
> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Michal Cieslakiewicz
> Sent: Dienstag, 6. August 2019 13:01
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 6/7] ath79: WNR2200: use gpio_hog instead
> of gpio-export for USB power
> 
> To follow new best practice for DTS files, this patch changes
> definition for GPIO pin 4 on Wifi chip (USB power control) from
> 'gpio-export' to 'gpio_hog'. Tested and confirmed to work.
> 
> Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

Hi,

please already include that in your device support PRs.

gpio-export should not be used for new device support patches any more.

Best

Adrian

Patch
diff mbox series

diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dts
index 738fc55ec6..3b4eb7fa86 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dts
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dts
@@ -136,16 +136,6 @@ 
 			linux,default-trigger = "phy0tpt";
 		};
 	};
-
-	gpio-export {
-		compatible = "gpio-export";
-
-		gpio_usb_power {
-			gpio-export,name = "netgear:power:usb";
-			gpio-export,output = <1>;
-			gpios = <&ath9k 4 GPIO_ACTIVE_HIGH>;
-		};
-	};
 };
 
 &spi {
@@ -213,6 +203,13 @@ 
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
+
+		usb {
+			gpio-hog;
+			line-name = "netgear:power:usb";
+			gpios = <4 GPIO_ACTIVE_HIGH>;
+			output-high;
+		};
 	};
 };