Re: [PATCH v2] usb: phy: phy-gpio-vbus-usb: Convert to GPIO descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 12, 2020 at 12:54 PM Robert Jarzmik <robert.jarzmik@xxxxxxx> wrote:
> Linus Walleij <linus.walleij@xxxxxxxxxx> writes:

> Hi Linus,
>
> Throughout this patch, if I get it right, you suppose that :
>  - the gpio_request() for the vbus is called as gpio_request(xx, gpio, "vbus")
>  - the gpio_request() for the pullup is called as gpio_request(xx, gpio, "pullup")
>
> My understanding from drivers/usb/phy/phy-gpio-vbus-usb.c is that these name are
> :
>  - "vbus_detect"
>  - "udc_pullup"
>
> Have I missed something ?

There are two names. The lookup name that I just invented to be
"vbus" and "pullup". One reason to choose these names is that
if someone migrates the platforms to device tree they can name
the DT property vbus-gpios = <...>; pullup-gpios = <...>;
which I think makes sense.

Then there is the consumer name that is shown in debugfs etc.

That is preserved with these calls:

+       gpiod_set_consumer_name(gpio_vbus->vbus_gpiod, "vbus_detect");
(...)
+       if (gpio_vbus->pullup_gpiod)
+               gpiod_set_consumer_name(gpio_vbus->pullup_gpiod, "udc_pullup");

Yours,
Linus Walleij



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux