From: nicolas.ferre@atmel•com (Nicolas Ferre)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: at91/usbh: fix overcurrent gpio setup
Date: Fri, 16 Nov 2012 11:32:14 +0100 [thread overview]
Message-ID: <50A6162E.1000502@atmel.com> (raw)
In-Reply-To: <1352891897-18708-1-git-send-email-jhovold@gmail.com>
On 11/14/2012 12:18 PM, Johan Hovold :
> Use gpio_is_valid also for overcurrent pins (which are currently
> negative in many board files).
>
> Signed-off-by: Johan Hovold <jhovold@gmail•com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel•com>
Queued in at91-fixes for 3.7-final.
Thanks a lot. Best regards,
> ---
> arch/arm/mach-at91/at91rm9200_devices.c | 2 +-
> arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
> arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
> arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
> index 1e122bc..3cee0e6 100644
> --- a/arch/arm/mach-at91/at91rm9200_devices.c
> +++ b/arch/arm/mach-at91/at91rm9200_devices.c
> @@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
>
> /* Enable overcurrent notification */
> for (i = 0; i < data->ports; i++) {
> - if (data->overcurrent_pin[i])
> + if (gpio_is_valid(data->overcurrent_pin[i]))
> at91_set_gpio_input(data->overcurrent_pin[i], 1);
> }
>
> diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
> index aa1e587..414bd85 100644
> --- a/arch/arm/mach-at91/at91sam9260_devices.c
> +++ b/arch/arm/mach-at91/at91sam9260_devices.c
> @@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
>
> /* Enable overcurrent notification */
> for (i = 0; i < data->ports; i++) {
> - if (data->overcurrent_pin[i])
> + if (gpio_is_valid(data->overcurrent_pin[i]))
> at91_set_gpio_input(data->overcurrent_pin[i], 1);
> }
>
> diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
> index b948769..cd604aa 100644
> --- a/arch/arm/mach-at91/at91sam9261_devices.c
> +++ b/arch/arm/mach-at91/at91sam9261_devices.c
> @@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
>
> /* Enable overcurrent notification */
> for (i = 0; i < data->ports; i++) {
> - if (data->overcurrent_pin[i])
> + if (gpio_is_valid(data->overcurrent_pin[i]))
> at91_set_gpio_input(data->overcurrent_pin[i], 1);
> }
>
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index cb85da2..9c61e59 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
>
> /* Enable overcurrent notification */
> for (i = 0; i < data->ports; i++) {
> - if (data->overcurrent_pin[i])
> + if (gpio_is_valid(data->overcurrent_pin[i]))
> at91_set_gpio_input(data->overcurrent_pin[i], 1);
> }
>
>
--
Nicolas Ferre
prev parent reply other threads:[~2012-11-16 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 11:18 [PATCH] ARM: at91/usbh: fix overcurrent gpio setup Johan Hovold
2012-11-16 10:32 ` Nicolas Ferre [this message]
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=50A6162E.1000502@atmel.com \
--to=nicolas.ferre@atmel$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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