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:25P

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)(st

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);

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 wr

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: [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 pin

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 converto

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 su

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

2014-08-12 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 p

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

[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 s