[PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-31 Thread Wang YanQing
gpio user before call pl2303_release. Signed-off-by: Wang YanQing --- Note: I sniffed office HXD gpio test program to get gpios control protocol with PL2303 RA, so I only test it with PL2303 RA and HXA, I don't have HXD, but because it is *office* HXD gpio test pr

Re: [PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-09-04 Thread Wang YanQing
On Sun, Aug 31, 2014 at 11:24:56PM +0800, Wang YanQing wrote: > PL2303 USB Serial devices may has GPIOs, this patch add > basic PL2303 gpio support. > > Known issue: > If gpios are in use(export to userspace through sysfs interface, etc), > then call pl2303_release(unplug us

Re: [PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-09-04 Thread Wang YanQing
On Thu, Sep 04, 2014 at 06:44:31PM +0200, Benjamin Henrion wrote: > On Thu, Sep 4, 2014 at 6:14 PM, Benjamin Henrion wrote: > > I have subscribed to the lkml. > > > > Can you make me a favour, send me your email as you posted on the LKML > > in mbox format attached to an email? > > > > I am trying

Re: [PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-09-09 Thread Wang YanQing
On Tue, Sep 09, 2014 at 12:08:56PM +0200, Johan Hovold wrote: > On Fri, Sep 05, 2014 at 09:30:11AM +0800, Wang YanQing wrote: > > On Thu, Sep 04, 2014 at 06:44:31PM +0200, Benjamin Henrion wrote: > > > On Thu, Sep 4, 2014 at 6:14 PM, Benjamin Henrion wrote: > > > >

Re: [PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-09-09 Thread Wang YanQing
On Tue, Sep 09, 2014 at 04:02:04PM +0200, Johan Hovold wrote: > On Tue, Sep 09, 2014 at 12:43:56PM +0200, Johan Hovold wrote: > > On Tue, Sep 09, 2014 at 06:21:31PM +0800, Wang YanQing wrote: > > > On Tue, Sep 09, 2014 at 12:08:56PM +0200, Johan Hovold wrote: > > > >

Re: [PATCH v8] usb:serial:pl2303: add GPIOs interface on PL2303

2014-09-09 Thread Wang YanQing
On Tue, Sep 09, 2014 at 04:02:04PM +0200, Johan Hovold wrote: > On Tue, Sep 09, 2014 at 12:43:56PM +0200, Johan Hovold wrote: > > On Tue, Sep 09, 2014 at 06:21:31PM +0800, Wang YanQing wrote: > > > On Tue, Sep 09, 2014 at 12:08:56PM +0200, Johan Hovold wrote: > > > >

[PATCH] gpio:gpio-pl2303: add gpio driver for GPIOs on PL2303

2014-07-19 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add driver for it. Signed-off-by: Wang YanQing --- MAINTAINERS | 5 + drivers/gpio/Kconfig| 7 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-pl2303.c | 238 drivers/usb

[PATCH v2] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-19 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v1-v2: 1:drop gpio-pl2303.c and relation stuff 2:hang gpio stuff off of pl2303.c drivers/usb/serial/Kconfig | 7 ++ drivers/usb/serial/pl2303.c | 153

[PATCH v3] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-20 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v2-v3: 1: fix errors and warnings reported by Daniele Forsi checked with checkpatch.pl 2: fix missing GPIOLIB dependence in Kconfig 3: fix pl2303_gpio_get can't work Known issue: If gpio

Re: [PATCH v3] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-21 Thread Wang YanQing
On Mon, Jul 21, 2014 at 07:46:46AM +0200, Andreas Mohr wrote: > Hi, > > Did some more review, sorry ;) > > On Mon, Jul 21, 2014 at 10:46:24AM +0800, Wang YanQing wrote: > > +static struct gpio_chip template_chip = { > > + .label = &q

[PATCH v4] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-24 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v3-v4: 1: fix missing static for gpio_dir_mask and gpio_value_mask 2: reduce unneeded compile macro defined suggested by gno...@lxorguk.ukuu.org.uk 3: use true instead of 1 corrected by Linus

[PATCH v5] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-25 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v4-v5: 1: fix gpio_chip.lable been overwrited by template_chip. 2: use idr to manage minor instead of crude monotonous atomic increment. drivers/usb/serial/Kconfig | 10 +++ drivers/usb

Re: [PATCH v5] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-29 Thread Wang YanQing
On Fri, Jul 25, 2014 at 09:53:23PM +0200, Andreas Mohr wrote: > Hi, > > On Sat, Jul 26, 2014 at 01:35:23AM +0800, Wang YanQing wrote: > > > + It support 2 GPIOs on PL2303HX currently, > "supports" > Right! > > +static u8 gpio_dir_mask[

[PATCH v6] usb:serial:pl2303: add GPIOs interface on PL2303

2014-07-29 Thread Wang YanQing
PL2303HX has two GPIOs, this patch add interface for it. Signed-off-by: Wang YanQing --- Changes v5-v6: 1: fix typo error in Kconfig reported by Andreas Mohr 2: add const qulification to gpio_dir_mask and gpio_value_mask suggested by Andreas Mohr Hi, Linus Walleij, I see you give your

Resend Re: [PATCH v6] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-04 Thread Wang YanQing
I change my system recently, and sendmail has trouble to send mails to kernel mail list, so I resend it with my old system. Ok, before I send out next version, I still has some vague places, see below: On Mon, Aug 04, 2014 at 04:00:32PM +0200, Johan Hovold wrote: > > +config USB_SERIAL_P

Re: Resend Re: [PATCH v6] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-07 Thread Wang YanQing
On Tue, Aug 05, 2014 at 03:54:08PM +0200, Johan Hovold wrote: > > > I noticed that setting direction to output and setting the gpio high has > > > no effect on the read-back value (i.e. I still read back 0) for my > > > pl2303hx (note that my device has no easily accessible gpios so I > > > haven't

Re: Resend Re: [PATCH v6] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-08 Thread Wang YanQing
On Fri, Aug 08, 2014 at 09:54:42AM +0200, Johan Hovold wrote: > On Fri, Aug 08, 2014 at 03:10:34AM +0800, Wang YanQing wrote: > > On Tue, Aug 05, 2014 at 03:54:08PM +0200, Johan Hovold wrote: > > > > > I noticed that setting direction to output and setting the gpio high &g

[PATCH v7] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-08 Thread Wang YanQing
sysfs interface, etc), then call pl2303_release(unplug usb-serial convertor, modprobe -r, etc), will cause trouble, so we need to make sure there is no gpio user before call pl2303_release. Signed-off-by: Wang YanQing --- Changes v6-v7: 1: add generic gpio support interfaces for pl2303 USB

Re: [PATCH v7] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-16 Thread Wang YanQing
On Tue, Aug 12, 2014 at 04:46:25PM +0200, Johan Hovold wrote: > On Sat, Aug 09, 2014 at 01:28:28PM +0800, Wang YanQing wrote: > > PL2303 USB Serial devices always has GPIOs, > > Always? Are you sure? It's probably better to write "might have" as they > are unli

Re: [PATCH v7] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-16 Thread Wang YanQing
Hi Johan Hovold. Another two questions. On Tue, Aug 12, 2014 at 04:46:25PM +0200, Johan Hovold wrote: > > > + int (*gpio_startup)(struct usb_serial *serial); > > + void (*gpio_release)(struct usb_serial *serial); > > This isn't the right place for this abstraction. Most of the setup

Re: Resend Re: [PATCH v6] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-27 Thread Wang YanQing
On Tue, Aug 12, 2014 at 04:02:59PM +0200, Johan Hovold wrote: > On Sat, Aug 09, 2014 at 02:46:56AM +0800, Wang YanQing wrote: > > On Fri, Aug 08, 2014 at 09:54:42AM +0200, Johan Hovold wrote: > > > On Fri, Aug 08, 2014 at 03:10:34AM +0800, Wang YanQing wrote: > > > >

Re: [PATCH v7] usb:serial:pl2303: add GPIOs interface on PL2303

2014-08-27 Thread Wang YanQing
On Mon, Aug 18, 2014 at 12:07:20PM +0200, Johan Hovold wrote: > On Sun, Aug 17, 2014 at 10:05:36AM +0800, Wang YanQing wrote: > > Hi Johan Hovold. > > > > Another two questions. > > > > On Tue, Aug 12, 2014 at 04:46:25PM +0200, Johan Hovold wrote: > >