From: eric.y.miao@gmail.com (Eric Miao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio
Date: Wed, 21 Apr 2010 14:51:19 +0800 [thread overview]
Message-ID: <n2mf17812d71004202351w6a2edf79h53ff830733710687@mail.gmail.com> (raw)
In-Reply-To: <89D837B3-BCDC-48A4-BBF9-B292AE55D7AB@workware.net.au>
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
>
>
>
>
>
next prev parent reply other threads:[~2010-04-21 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 6:30 [PATCH] USB: gadget: pxa2xx: allow -1 for invalid gpio Steve Bennett
2010-04-21 6:51 ` Eric Miao [this message]
2010-04-21 12:29 ` Steve Bennett
2010-06-11 14:44 ` Eric Miao
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=n2mf17812d71004202351w6a2edf79h53ff830733710687@mail.gmail.com \
--to=eric.y.miao@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).