From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D40F0C83003 for ; Wed, 29 Apr 2020 12:49:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B02112087E for ; Wed, 29 Apr 2020 12:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588164568; bh=5/wUlfpAFr+xk1jHyr+vgbwi2/B7/efoDXjCT+3aLqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=vyMr9mO3ZiRmeZuMVSSRNLD0W9rhyuZVt88cK5nWw1akKzXez/33lET85z+bPi2QE 3LpYuX0LUrTwp6insMg+3c4OyzfnL/900NqycQl/8lM4YgXN4H7Fe+sw2Im/Kew5WP EfMiFy9JEFtr/i/mAYbmIHfsaW7VqG4lgYMNun/w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727052AbgD2Mt2 (ORCPT ); Wed, 29 Apr 2020 08:49:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:47730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbgD2Mt1 (ORCPT ); Wed, 29 Apr 2020 08:49:27 -0400 Received: from Mani-XPS-13-9360 (unknown [157.46.25.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E45F42085B; Wed, 29 Apr 2020 12:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588164567; bh=5/wUlfpAFr+xk1jHyr+vgbwi2/B7/efoDXjCT+3aLqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eMecHkiJKNNyePhQP3DvfOk7uu5YZDOt0LgHqh0CtMnlxIELsjmyJeEsCjdb5ShOU mEMFFBGsIvXgRq4JdccWJqSq2uIChJq8rYu86j0VxWSPmItZpJDWIc8gYt8Ojt0RBu aWkLhBEj6bhnIbh/lMVzg7vk5PA7Ap948+JakX58= Date: Wed, 29 Apr 2020 18:19:18 +0530 From: Manivannan Sadhasivam To: Linus Walleij Cc: Johan Hovold , Greg KH , linux-usb , "linux-kernel@vger.kernel.org" , patong.mxl@gmail.com, "open list:GPIO SUBSYSTEM" Subject: Re: [PATCH 2/2] usb: serial: xr_serial: Add gpiochip support Message-ID: <20200429124918.GC6443@Mani-XPS-13-9360> References: <20200428195651.6793-1-mani@kernel.org> <20200428195651.6793-3-mani@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi Linus, On Wed, Apr 29, 2020 at 02:12:24PM +0200, Linus Walleij wrote: > On Tue, Apr 28, 2020 at 9:57 PM wrote: > > > From: Manivannan Sadhasivam > > > > Add gpiochip support for Maxlinear/Exar USB to serial converter > > for controlling the available gpios. > > > > Cc: Linus Walleij > > Cc: linux-gpio@vger.kernel.org > > Signed-off-by: Manivannan Sadhasivam > > That's a nice and clean GPIO driver. Thanks for the compliments :) > > I would change this: > > port_priv->gc.label = "xr_gpios"; > > to something that is device-unique, like "xr-gpios-" > which makes it easy to locate the GPIOs on a specific serial converter > for lab use. However the USB serial maintainers know better what > to use here. Whatever makes a USB-to-serial unique from a TTY > point of view is probably fine with me too. > > My idea is that people might want to know which USB cable > this is sitting on, so I have this USB cable and from this label > I can always figure out which GPIO device it is. > Sounds reasonable. I can postfix the PID as below: port_priv->gc.label = devm_kasprintf(port->dev, GFP_KERNEL, "XR%04x", port_priv->idProduct); So this will become, "XR1410". > Either way, it is not a super-big issue so: > Reviewed-by: Linus Walleij > > Is this a off-the-shelf product that can be bought or is it mainly > integrated on boards? > Both I believe, though I have only used it integrated in dev boards. But a quick googling gives me below, https://www.digikey.in/product-detail/en/maxlinear-inc/XR21V1410IL-0C-EB/1016-1425-ND/2636664 Thanks, Mani > I'm asking because I'm looking for a neat USB-to-serial adapter > with some GPIOs (2 is enough) that can be used for reset and > power cycling of lab boards using one simple piece of equipment. > > Yours, > Linus Walleij