linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: at91/usbh: fix overcurrent gpio setup
@ 2012-11-14 11:18 Johan Hovold
  2012-11-16 10:32 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2012-11-14 11:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use gpio_is_valid also for overcurrent pins (which are currently
negative in many board files).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
 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);
 	}
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: at91/usbh: fix overcurrent gpio setup
  2012-11-14 11:18 [PATCH] ARM: at91/usbh: fix overcurrent gpio setup Johan Hovold
@ 2012-11-16 10:32 ` Nicolas Ferre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2012-11-16 10:32 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-16 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 11:18 [PATCH] ARM: at91/usbh: fix overcurrent gpio setup Johan Hovold
2012-11-16 10:32 ` Nicolas Ferre

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).