lkml.org 
[lkml]   [2020]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] usb: serial: xr_serial: Add gpiochip support
Hi Linus,

On Wed, Apr 29, 2020 at 02:12:24PM +0200, Linus Walleij wrote:
> On Tue, Apr 28, 2020 at 9:57 PM <mani@kernel.org> wrote:
>
> > From: Manivannan Sadhasivam <mani@kernel.org>
> >
> > Add gpiochip support for Maxlinear/Exar USB to serial converter
> > for controlling the available gpios.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: linux-gpio@vger.kernel.org
> > Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
>
> 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-<serial number>"
> 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 <linus.walleij@linaro.org>
>
> 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

\
 
 \ /
  Last update: 2020-04-29 14:49    [W:0.095 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site