From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org
Cc: plagnioj@jcrosoft.com, ludovic.desroches@atmel.com,
linux-kernel@vger.kernel.org, arnd@arndb.de, olof@lixom.net,
Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: [PATCH v2 03/13] ARM: at91/USB host: specify and handle properly vbus_pin_active_low
Date: Tue, 3 Apr 2012 09:32:47 +0200 [thread overview]
Message-ID: <b03f22ebfb381eb04dbeb1e0de1cf485e4672a3c.1333437885.git.nicolas.ferre@atmel.com> (raw)
In-Reply-To: <cover.1333437885.git.nicolas.ferre@atmel.com>
In-Reply-To: <cover.1333437885.git.nicolas.ferre@atmel.com>
Due to an error while handling vbus_pin_active_low in ohci-at91 driver,
the specification of this property was not good in devices/board files.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@vger.kernel.org> [3.2+]
---
arch/arm/mach-at91/at91sam9263_devices.c | 3 ++-
arch/arm/mach-at91/at91sam9g45_devices.c | 6 ++++--
arch/arm/mach-at91/board-sam9263ek.c | 1 +
arch/arm/mach-at91/board-sam9m10g45ek.c | 1 +
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 53688c4..27cfce3 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -72,7 +72,8 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i], 0);
+ at91_set_gpio_output(data->vbus_pin[i],
+ data->vbus_pin_active_low[i]);
}
/* Enable overcurrent notification */
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 698479f..ddf210a 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -127,7 +127,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i], 0);
+ at91_set_gpio_output(data->vbus_pin[i],
+ data->vbus_pin_active_low[i]);
}
/* Enable overcurrent notification */
@@ -188,7 +189,8 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i], 0);
+ at91_set_gpio_output(data->vbus_pin[i],
+ data->vbus_pin_active_low[i]);
}
usbh_ehci_data = *data;
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 66f0ddf..2ffe50f 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -74,6 +74,7 @@ static void __init ek_init_early(void)
static struct at91_usbh_data __initdata ek_usbh_data = {
.ports = 2,
.vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 },
+ .vbus_pin_active_low = {1, 1},
.overcurrent_pin= {-EINVAL, -EINVAL},
};
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index e1bea73..c88e908 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -71,6 +71,7 @@ static void __init ek_init_early(void)
static struct at91_usbh_data __initdata ek_usbh_hs_data = {
.ports = 2,
.vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3},
+ .vbus_pin_active_low = {1, 1},
.overcurrent_pin= {-EINVAL, -EINVAL},
};
--
1.7.9.4
next prev parent reply other threads:[~2012-04-03 7:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 7:32 [PATCH v2 00/13] at91: 3.4-rc1 fixes Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 01/13] ARM: at91/at91sam9x5: add clkdev entries for DMA controllers Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 02/13] USB: ohci-at91: fix vbus_pin_active_low handling Nicolas Ferre
2012-04-03 7:32 ` Nicolas Ferre [this message]
2012-04-03 7:32 ` [PATCH v2 04/13] ARM: at91/dts: USB host vbus is active low Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 05/13] USB: ohci-at91: rework and fix initialization Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 06/13] USB: ohci-at91: change maximum number of ports Nicolas Ferre
2012-04-03 14:11 ` Alan Stern
2012-04-03 15:04 ` Nicolas Ferre
2012-04-03 15:25 ` Alan Stern
2012-04-03 15:30 ` [PATCH v3 06/12] " Nicolas Ferre
2012-04-04 16:07 ` Alan Stern
2012-04-03 7:32 ` [PATCH v2 07/13] USB: ohci-at91: coding style modifications with one-line ifs Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 08/13] USB: ohci-at91: trivial return code name change Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 09/13] ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 10/13] ARM: at91/NAND DT bindings: add comments Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 11/13] USB: ehci-atmel: add needed of.h header file Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 12/13] ARM: at91: fix check of valid GPIO for SPI and USB Nicolas Ferre
2012-04-03 7:32 ` [PATCH v2 13/13] ARM: at91: dt: remove unit-address part for memory nodes Nicolas Ferre
2012-04-04 19:17 ` Olof Johansson
2012-04-07 1:43 ` Grant Likely
2012-04-03 11:55 ` [PATCH v2 00/13] at91: 3.4-rc1 fixes Nicolas Ferre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b03f22ebfb381eb04dbeb1e0de1cf485e4672a3c.1333437885.git.nicolas.ferre@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=olof@lixom.net \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).