* [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio
@ 2010-04-21 6:30 Steve Bennett
2010-04-21 6:51 ` Eric Miao
2010-06-11 14:44 ` Eric Miao
0 siblings, 2 replies; 4+ messages in thread
From: Steve Bennett @ 2010-04-21 6:30 UTC (permalink / raw)
To: linux-arm-kernel
gpio must be int, not u16, otherwise -1 isn't recognised
by gpio_is_valid().
Signed-off-by: Steve Bennett <steveb@workware.net.au>
---
arch/arm/include/asm/mach/udc_pxa2xx.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
index f3eabf1..833306e 100644
--- a/arch/arm/include/asm/mach/udc_pxa2xx.h
+++ b/arch/arm/include/asm/mach/udc_pxa2xx.h
@@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info {
* here. Note that sometimes the signals go through inverters...
*/
bool gpio_vbus_inverted;
- u16 gpio_vbus; /* high == vbus present */
+ int gpio_vbus; /* high == vbus present */
bool gpio_pullup_inverted;
- u16 gpio_pullup; /* high == pullup activated */
+ int gpio_pullup; /* high == pullup activated */
};
--
?Web: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au P: 0434 921 300
E: steveb at workware.net.au F: 07 3102 9221
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio
2010-04-21 6:30 [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio Steve Bennett
@ 2010-04-21 6:51 ` Eric Miao
2010-04-21 12:29 ` Steve Bennett
2010-06-11 14:44 ` Eric Miao
1 sibling, 1 reply; 4+ messages in thread
From: Eric Miao @ 2010-04-21 6:51 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 21, 2010 at 2:30 PM, Steve Bennett <steveb@workware.net.au> wrote:
> gpio must be int, not u16, otherwise -1 isn't recognised
> by gpio_is_valid().
>
> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Ack.
And better submit a patch as well for pxa2xx_udc.c to allow -1 as no GPIO.
> ---
> ?arch/arm/include/asm/mach/udc_pxa2xx.h | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
> index f3eabf1..833306e 100644
> --- a/arch/arm/include/asm/mach/udc_pxa2xx.h
> +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h
> @@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info {
> ? ? ? ? * here. ?Note that sometimes the signals go through inverters...
> ? ? ? ? */
> ? ? ? ?bool ? ?gpio_vbus_inverted;
> - ? ? ? u16 ? ? gpio_vbus; ? ? ? ? ? ? ? ? ? ? ?/* high == vbus present */
> + ? ? ? int ? ? gpio_vbus; ? ? ? ? ? ? ? ? ? ? ?/* high == vbus present */
> ? ? ? ?bool ? ?gpio_pullup_inverted;
> - ? ? ? u16 ? ? gpio_pullup; ? ? ? ? ? ? ? ? ? ?/* high == pullup activated */
> + ? ? ? int ? ? gpio_pullup; ? ? ? ? ? ? ? ? ? ?/* high == pullup activated */
> ?};
>
>
>
> --
> ?Web: Embedded Web Framework - http://uweb.workware.net.au/
> WorkWare Systems Pty Ltd
> W: www.workware.net.au ? ? ?P: 0434 921 300
> E: steveb at workware.net.au ? F: 07 3102 9221
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio
2010-04-21 6:51 ` Eric Miao
@ 2010-04-21 12:29 ` Steve Bennett
0 siblings, 0 replies; 4+ messages in thread
From: Steve Bennett @ 2010-04-21 12:29 UTC (permalink / raw)
To: linux-arm-kernel
On 21/04/2010, at 4:51 PM, Eric Miao wrote:
> On Wed, Apr 21, 2010 at 2:30 PM, Steve Bennett <steveb@workware.net.au> wrote:
>> gpio must be int, not u16, otherwise -1 isn't recognised
>> by gpio_is_valid().
>>
>> Signed-off-by: Steve Bennett <steveb@workware.net.au>
>
> Ack.
>
> And better submit a patch as well for pxa2xx_udc.c to allow -1 as no GPIO.
Both pxa25x_udc.c and pxa_27x_udc.c already use gpio_is_valid() which checks >= 0.
Unless I'm missing something, there is nothing else to do there.
>
>> ---
>> arch/arm/include/asm/mach/udc_pxa2xx.h | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
>> index f3eabf1..833306e 100644
>> --- a/arch/arm/include/asm/mach/udc_pxa2xx.h
>> +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h
>> @@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info {
>> * here. Note that sometimes the signals go through inverters...
>> */
>> bool gpio_vbus_inverted;
>> - u16 gpio_vbus; /* high == vbus present */
>> + int gpio_vbus; /* high == vbus present */
>> bool gpio_pullup_inverted;
>> - u16 gpio_pullup; /* high == pullup activated */
>> + int gpio_pullup; /* high == pullup activated */
>> };
>>
>>
>>
>> --
>> ?Web: Embedded Web Framework - http://uweb.workware.net.au/
>> WorkWare Systems Pty Ltd
>> W: www.workware.net.au P: 0434 921 300
>> E: steveb at workware.net.au F: 07 3102 9221
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio
2010-04-21 6:30 [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio Steve Bennett
2010-04-21 6:51 ` Eric Miao
@ 2010-06-11 14:44 ` Eric Miao
1 sibling, 0 replies; 4+ messages in thread
From: Eric Miao @ 2010-06-11 14:44 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 21, 2010 at 2:30 PM, Steve Bennett <steveb@workware.net.au> wrote:
> gpio must be int, not u16, otherwise -1 isn't recognised
> by gpio_is_valid().
>
> Signed-off-by: Steve Bennett <steveb@workware.net.au>
This looks to have missed the last merge window, I'm picking this up
into the pxa tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-11 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 6:30 [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio Steve Bennett
2010-04-21 6:51 ` Eric Miao
2010-04-21 12:29 ` Steve Bennett
2010-06-11 14:44 ` Eric Miao
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).