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 zoo...@gmail.com wrote: I have subscribed

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: On Fri, Sep 05, 2014 at 09:30:11AM +0800

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: On Fri, Sep 05, 2014 at 09:30:11AM +0800

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 usb-serial convertor, modprobe

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 zoo...@gmail.com 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

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

2014-08-31 Thread Wang YanQing
there is no gpio user before call pl2303_release. Signed-off-by: Wang YanQing udkni...@gmail.com --- 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

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: On Tue, Aug 05, 2014 at 03:54:08PM +0200

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: + int (*gpio_startup)(struct usb_serial

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 unlikely to be accessible even if the pins exist

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 code

[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 udkni...@gmail.com --- Changes v6-v7: 1: add generic gpio support interfaces

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 verified

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

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[GPIO_NUM] = {0x10, 0x20}; +static u8 gpio_value_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 udkni...@gmail.com --- 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

[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 udkni...@gmail.com --- 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

[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 udkni...@gmail.com --- 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

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 = pl2303-gpio, + .owner

[PATCH v2] 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 udkni...@gmail.com --- 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 udkni...@gmail.com --- 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

[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 udkni...@gmail.com --- MAINTAINERS | 5 + drivers/gpio/Kconfig| 7 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-pl2303.c | 238