ar71xx: use gpio_request_one instead of ath79_set_usb_power_gpio

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34087
owl
Gabor Juhos 2012-11-05 13:23:27 +00:00
parent e8669729bc
commit f2528b1792
9 changed files with 30 additions and 19 deletions

View File

@ -101,7 +101,8 @@ static void __init hornet_ub_gpio_setup(void)
t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN; t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN;
ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t); ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t);
ath79_set_usb_power_gpio(HORNET_UB_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(HORNET_UB_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
} }

View File

@ -109,7 +109,8 @@ static void __init tl_mr11u_setup(void)
ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL, ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL,
ARRAY_SIZE(tl_mr11u_gpio_keys), ARRAY_SIZE(tl_mr11u_gpio_keys),
tl_mr11u_gpio_keys); tl_mr11u_gpio_keys);
ath79_set_usb_power_gpio(TL_MR11U_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(TL_MR11U_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
} }
@ -122,7 +123,8 @@ static void __init tl_mr3040_setup(void)
ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL, ath79_register_gpio_keys_polled(-1, TL_MR11U_KEYS_POLL_INTERVAL,
1, tl_mr11u_gpio_keys); 1, tl_mr11u_gpio_keys);
ath79_set_usb_power_gpio(TL_MR3040_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(TL_MR3040_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
} }

View File

@ -109,7 +109,8 @@ static void __init tl_mr3020_setup(void)
ARRAY_SIZE(tl_mr3020_gpio_keys), ARRAY_SIZE(tl_mr3020_gpio_keys),
tl_mr3020_gpio_keys); tl_mr3020_gpio_keys);
ath79_set_usb_power_gpio(TL_MR3020_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(TL_MR3020_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
ath79_register_usb(); ath79_register_usb();

View File

@ -102,7 +102,8 @@ static void __init tl_ap99_setup(void)
static void __init tl_mr3x20_usb_setup(void) static void __init tl_mr3x20_usb_setup(void)
{ {
/* enable power for the USB port */ /* enable power for the USB port */
ath79_set_usb_power_gpio(TL_MR3X20_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(TL_MR3X20_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
ath79_register_usb(); ath79_register_usb();
} }

View File

@ -175,9 +175,11 @@ static void __init wdr4300_setup(void)
ath79_eth0_pll_data.pll_1000 = 0x06000000; ath79_eth0_pll_data.pll_1000 = 0x06000000;
ath79_register_eth(0); ath79_register_eth(0);
ath79_set_usb_power_gpio(WDR4300_GPIO_USB1_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(WDR4300_GPIO_USB1_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB1 power"); "USB1 power");
ath79_set_usb_power_gpio(WDR4300_GPIO_USB2_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(WDR4300_GPIO_USB2_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB2 power"); "USB2 power");
ath79_register_usb(); ath79_register_usb();
} }

View File

@ -69,7 +69,8 @@ static void __init tl_wr703n_setup(void)
ARRAY_SIZE(tl_wr703n_gpio_keys), ARRAY_SIZE(tl_wr703n_gpio_keys),
tl_wr703n_gpio_keys); tl_wr703n_gpio_keys);
ath79_set_usb_power_gpio(TL_WR703N_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, gpio_request_one(TL_WR703N_GPIO_USB_POWER,
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"USB power"); "USB power");
ath79_register_usb(); ath79_register_usb();

View File

@ -185,7 +185,8 @@ static void __init wzrhpag300h_setup(void)
ath79_register_eth(0); ath79_register_eth(0);
ath79_register_eth(1); 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_usb();
ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpag300h_leds_gpio), ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpag300h_leds_gpio),

View File

@ -158,7 +158,8 @@ static void __init wzrhpg300nh2_setup(void)
ath79_register_eth(0); ath79_register_eth(0);
/* gpio13 is usb power. Turn it on. */ /* 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_usb();
ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh2_leds_gpio), ath79_register_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh2_leds_gpio),

View File

@ -156,7 +156,8 @@ static void __init wzrhpg450h_init(void)
ath79_register_eth(0); 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(); ath79_register_usb();
ap91_pci_init(ee, NULL); ap91_pci_init(ee, NULL);