Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756913AbaGXJf0 (ORCPT ); Thu, 24 Jul 2014 05:35:26 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:59002 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbaGXJfX (ORCPT ); Thu, 24 Jul 2014 05:35:23 -0400 Date: Thu, 24 Jul 2014 10:34:47 +0100 From: One Thousand Gnomes To: Greg KH Cc: Wang YanQing , linus.walleij@linaro.org, jhovold@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb:serial:pl2303: add GPIOs interface on PL2303 Message-ID: <20140724103447.047627ee@alan.etchedpixels.co.uk> In-Reply-To: <20140723162129.GB6871@kroah.com> References: <20140720063841.GA28059@udknight> <20140723170314.23864779@alan.etchedpixels.co.uk> <20140723162129.GB6871@kroah.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Jul 2014 09:21:29 -0700 Greg KH 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/