eb0b767cd3ed9fd1196c61d68629929b620eb636
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-3.18 / 813-USB-bcma-fix-setting-VCC-GPIO-value.patch
1 From a9e32f77ff74492d79fe2e24f0418136acd8a680 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Sun, 21 Jun 2015 12:09:57 +0200
4 Subject: [PATCH] USB: bcma: fix setting VCC GPIO value
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It wasn't working (on most of devices?) without setting GPIO direction.
10
11 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
12 ---
13 drivers/usb/host/bcma-hcd.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
17 index f7a66b9..b31e3cc 100644
18 --- a/drivers/usb/host/bcma-hcd.c
19 +++ b/drivers/usb/host/bcma-hcd.c
20 @@ -238,7 +238,7 @@ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
21
22 if (val) {
23 gpio_request(gpio, "bcma-hcd-gpio");
24 - gpio_set_value(gpio, 1);
25 + gpio_direction_output(gpio, 1);
26 } else {
27 gpio_set_value(gpio, 0);
28 gpio_free(gpio);
29 --
30 1.8.4.5
31