Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Ludovic Desroches
On Wed, Feb 07, 2018 at 02:55:35PM +0100, Linus Walleij wrote:
> On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches
>  wrote:
> 
> > Use GPIO descriptors instead of relying on the old method.
> > Include irq.h header since it is needed and was indirectly
> > included through of_gpio.h.
> >
> > Signed-off-by: Ludovic Desroches 
> 
> Reviewed-by: Linus Walleij 
> 
> Thank you for doing gpiod conversions. Making the world
> a better place!

Thanks, I wish it would be so easy!

I will send a v2 because I have the same issue that the one pointed by
Andy about the gpiod conversion for the lcd driver.

- udc->vbus_pin = devm_gpiod_get_optional(>dev, "atmel,vbus", GPIOD_IN);
+ udc->vbus_pin = devm_gpiod_get(>dev, "atmel,vbus", GPIOD_IN);
+ if (IS_ERR(udc->vbus_pin))
+   udc->vbus_pin = NULL;

I am not sure if I should prefer devm_gpiod_get_optional or
devm_gpiod_get.

Regards

Ludovic


Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Ludovic Desroches
On Wed, Feb 07, 2018 at 02:55:35PM +0100, Linus Walleij wrote:
> On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches
>  wrote:
> 
> > Use GPIO descriptors instead of relying on the old method.
> > Include irq.h header since it is needed and was indirectly
> > included through of_gpio.h.
> >
> > Signed-off-by: Ludovic Desroches 
> 
> Reviewed-by: Linus Walleij 
> 
> Thank you for doing gpiod conversions. Making the world
> a better place!

Thanks, I wish it would be so easy!

I will send a v2 because I have the same issue that the one pointed by
Andy about the gpiod conversion for the lcd driver.

- udc->vbus_pin = devm_gpiod_get_optional(>dev, "atmel,vbus", GPIOD_IN);
+ udc->vbus_pin = devm_gpiod_get(>dev, "atmel,vbus", GPIOD_IN);
+ if (IS_ERR(udc->vbus_pin))
+   udc->vbus_pin = NULL;

I am not sure if I should prefer devm_gpiod_get_optional or
devm_gpiod_get.

Regards

Ludovic


Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Linus Walleij
On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches
 wrote:

> Use GPIO descriptors instead of relying on the old method.
> Include irq.h header since it is needed and was indirectly
> included through of_gpio.h.
>
> Signed-off-by: Ludovic Desroches 

Reviewed-by: Linus Walleij 

Thank you for doing gpiod conversions. Making the world
a better place!

Yours,
Linus Walleij


Re: [PATCH 2/2] usb: gadget: udc: atmel: convert to use GPIO descriptors

2018-02-07 Thread Linus Walleij
On Thu, Feb 1, 2018 at 10:34 AM, Ludovic Desroches
 wrote:

> Use GPIO descriptors instead of relying on the old method.
> Include irq.h header since it is needed and was indirectly
> included through of_gpio.h.
>
> Signed-off-by: Ludovic Desroches 

Reviewed-by: Linus Walleij 

Thank you for doing gpiod conversions. Making the world
a better place!

Yours,
Linus Walleij