lkml.org 
[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] usb:serial:pl2303: add GPIOs interface on PL2303
On Wed, 23 Jul 2014 09:21:29 -0700
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Wed, Jul 23, 2014 at 05:03:14PM +0100, One Thousand Gnomes wrote:
> > > + if (gpiochip_remove(&spriv->gpio->gpio_chip))
> > > + dev_err(&serial->interface->dev, "unable to remove gpio_chip?\n");
> > > + kfree(spriv->gpio);
> > > + }
> > > +#endif
> > > kfree(spriv);
> >
> > Only other question I have - if I have multiple PL2303HX adapters how
> > will I work out which GPIO lines belong to which /dev/ttyUSB* interface ?
>
> sysfs _should_ show you this, as it should point to the "parent" device,
> which will be associated with the ttyUSB interface. Well, both the tty
> device and the gpio device will have the same parent, is that good
> enough to determine this, or should the gpio device have the tty device
> as its parent?

Good point - that's probably sufficient as is. The GPIO and tty lines are
sometimes used together and sometimes not.

Alan


\
 
 \ /
  Last update: 2014-07-24 12:22    [W:0.052 / U:3.832 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site