aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-25 16:15:01 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-25 16:15:01 +0000
commit40a3da18cd52a61bbc947b1ad3b1ab530b7af6f1 (patch)
treeb15637ee9db087007c17260a370bb45e0a4826a1 /target
parentb55fd4e5d44b32939cf8480eb9eae51e6b77534b (diff)
downloadopenwrt-40a3da18cd52a61bbc947b1ad3b1ab530b7af6f1.tar.gz
openwrt-40a3da18cd52a61bbc947b1ad3b1ab530b7af6f1.zip
AA: ar71xx: use gpio_request_one instead of ath79_set_usb_power_gpio
Backport of r34087. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@34333 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr11u.c10
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c10
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g300nh2.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g450h.c3
9 files changed, 30 insertions, 19 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c
index f8870e711..d2cfb0972 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-hornet-ub.c
@@ -101,8 +101,9 @@ static void __init hornet_ub_gpio_setup(void)
t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN;
ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t);
- ath79_set_usb_power_gpio(HORNET_UB_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(HORNET_UB_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
}
static void __init hornet_ub_setup(void)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr11u.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr11u.c
index 6b2820711..e13d02e68 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr11u.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr11u.c
@@ -109,8 +109,9 @@ static void __init tl_mr11u_setup(void)
ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL,
ARRAY_SIZE(tl_mr11u_gpio_keys),
tl_mr11u_gpio_keys);
- ath79_set_usb_power_gpio(TL_MR11U_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(TL_MR11U_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
}
MIPS_MACHINE(ATH79_MACH_TL_MR11U, "TL-MR11U", "TP-LINK TL-MR11U",
@@ -122,8 +123,9 @@ static void __init tl_mr3040_setup(void)
ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL,
1, tl_mr11u_gpio_keys);
- ath79_set_usb_power_gpio(TL_MR3040_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(TL_MR3040_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
}
MIPS_MACHINE(ATH79_MACH_TL_MR3040, "TL-MR3040", "TP-LINK TL-MR3040",
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
index 8f37d7a87..e0edbf8d7 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
@@ -109,8 +109,9 @@ static void __init tl_mr3020_setup(void)
ARRAY_SIZE(tl_mr3020_gpio_keys),
tl_mr3020_gpio_keys);
- ath79_set_usb_power_gpio(TL_MR3020_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(TL_MR3020_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c
index b35f09f8a..5924ac504 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3x20.c
@@ -102,8 +102,9 @@ static void __init tl_ap99_setup(void)
static void __init tl_mr3x20_usb_setup(void)
{
/* enable power for the USB port */
- ath79_set_usb_power_gpio(TL_MR3X20_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(TL_MR3X20_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
}
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
index 483aa6e93..7be29555d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
@@ -175,10 +175,12 @@ static void __init wdr4300_setup(void)
ath79_eth0_pll_data.pll_1000 = 0x06000000;
ath79_register_eth(0);
- ath79_set_usb_power_gpio(WDR4300_GPIO_USB1_POWER, GPIOF_OUT_INIT_HIGH,
- "USB1 power");
- ath79_set_usb_power_gpio(WDR4300_GPIO_USB2_POWER, GPIOF_OUT_INIT_HIGH,
- "USB2 power");
+ gpio_request_one(WDR4300_GPIO_USB1_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB1 power");
+ gpio_request_one(WDR4300_GPIO_USB2_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB2 power");
ath79_register_usb();
}
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
index f60f96245..dcd6fec1c 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
@@ -69,8 +69,9 @@ static void __init tl_wr703n_setup(void)
ARRAY_SIZE(tl_wr703n_gpio_keys),
tl_wr703n_gpio_keys);
- ath79_set_usb_power_gpio(TL_WR703N_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
- "USB power");
+ gpio_request_one(TL_WR703N_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c
index 868514c95..a7068e155 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-ag300h.c
@@ -185,7 +185,8 @@ static void __init wzrhpag300h_setup(void)
ath79_register_eth(0);
ath79_register_eth(1);
- ath79_set_usb_power_gpio(2, GPIOF_OUT_INIT_HIGH, "USB power");
+ gpio_request_one(2, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpag300h_leds_gpio),
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g300nh2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g300nh2.c
index 6c850cee5..4087288dc 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g300nh2.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g300nh2.c
@@ -158,7 +158,8 @@ static void __init wzrhpg300nh2_setup(void)
ath79_register_eth(0);
/* gpio13 is usb power. Turn it on. */
- ath79_set_usb_power_gpio(13, GPIOF_OUT_INIT_HIGH, "USB power");
+ gpio_request_one(13, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh2_leds_gpio),
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g450h.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g450h.c
index b5292db54..2c28a55f5 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g450h.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wzr-hp-g450h.c
@@ -156,7 +156,8 @@ static void __init wzrhpg450h_init(void)
ath79_register_eth(0);
- ath79_set_usb_power_gpio(16, GPIOF_OUT_INIT_HIGH, "USB power");
+ gpio_request_one(16, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
ath79_register_usb();
ap91_pci_init(ee, NULL);