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

2014-08-29 Thread Johan Hovold
On Thu, Aug 28, 2014 at 07:43:01AM +0800, Wang YanQing wrote: > 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

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

2014-08-29 Thread Johan Hovold
On Thu, Aug 28, 2014 at 07:43:01AM +0800, Wang YanQing wrote: 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

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

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-18 Thread Johan Hovold
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 *serial); > > > + void (*gpio_release)(struct usb_serial

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

2014-08-18 Thread Johan Hovold
On Sun, Aug 17, 2014 at 09:04:32AM +0800, Wang YanQing wrote: > 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

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

2014-08-18 Thread Johan Hovold
On Sun, Aug 17, 2014 at 09:04:32AM +0800, Wang YanQing wrote: 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

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

2014-08-18 Thread Johan Hovold
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 *serial); + void (*gpio_release)(struct usb_serial *serial); This

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

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

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

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

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

2014-08-13 Thread Greg KH
On Wed, Aug 13, 2014 at 09:05:09AM +0200, Johan Hovold wrote: > On Wed, Aug 13, 2014 at 08:17:50AM +0200, Hannes Petermaier wrote: > > > > > > > > Known issue: > > > > If gpios are in use(export to userspace through sysfs interface, etc), > > > > then call pl2303_release(unplug usb-serial

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

2014-08-13 Thread Johan Hovold
On Wed, Aug 13, 2014 at 08:17:50AM +0200, Hannes Petermaier wrote: > > > > > > Known issue: > > > If gpios are in use(export to userspace through sysfs interface, etc), > > > then call pl2303_release(unplug usb-serial convertor, modprobe -r, > etc), > > > will cause trouble, so we need to make

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

2014-08-13 Thread Hannes Petermaier
> > > > Known issue: > > If gpios are in use(export to userspace through 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. > > This is a real

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

2014-08-13 Thread Hannes Petermaier
Known issue: If gpios are in use(export to userspace through 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. This is a real problem that

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

2014-08-13 Thread Johan Hovold
On Wed, Aug 13, 2014 at 08:17:50AM +0200, Hannes Petermaier wrote: Known issue: If gpios are in use(export to userspace through 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

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

2014-08-13 Thread Greg KH
On Wed, Aug 13, 2014 at 09:05:09AM +0200, Johan Hovold wrote: On Wed, Aug 13, 2014 at 08:17:50AM +0200, Hannes Petermaier wrote: Known issue: If gpios are in use(export to userspace through sysfs interface, etc), then call pl2303_release(unplug usb-serial convertor, modprobe -r,

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

2014-08-12 Thread Johan Hovold
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. > this patch add > generic gpio support interfaces for pl2303

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

2014-08-12 Thread Johan Hovold
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. this patch add generic gpio support interfaces for pl2303 USB

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

2014-08-08 Thread Wang YanQing
PL2303 USB Serial devices always has GPIOs, this patch add generic gpio support interfaces for pl2303 USB Serial devices in pl2303_type_data and pl2303_serial_private, then use them to add GPIOs support for one type of them, PL2303HXA. Known issue: If gpios are in use(export to userspace through

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

2014-08-08 Thread Wang YanQing
PL2303 USB Serial devices always has GPIOs, this patch add generic gpio support interfaces for pl2303 USB Serial devices in pl2303_type_data and pl2303_serial_private, then use them to add GPIOs support for one type of them, PL2303HXA. Known issue: If gpios are in use(export to userspace through