[PATCH] usb: dwc3: Fix the return value of gpio_request_by_name()
Abbarapu, Venkatesh
venkatesh.abbarapu at amd.com
Fri Jan 6 05:44:16 CET 2023
Hi Marek,
Thanks. I will check and update.
Thanks
Venkatesh
> -----Original Message-----
> From: Marek Vasut <marex at denx.de>
> Sent: Friday, January 6, 2023 9:51 AM
> To: Abbarapu, Venkatesh <venkatesh.abbarapu at amd.com>; u-
> boot at lists.denx.de
> Cc: Simek, Michal <michal.simek at amd.com>; git at xilinx.com
> Subject: Re: [PATCH] usb: dwc3: Fix the return value of
> gpio_request_by_name()
>
> On 1/6/23 04:51, Venkatesh Yadav Abbarapu wrote:
> > As the "reset-gpios" property is optional, don't return the error and
> > just skip the gpio reset sequence.
> >
> > Signed-off-by: Venkatesh Yadav Abbarapu
> <venkatesh.abbarapu at amd.com>
> > ---
> >
> > drivers/usb/dwc3/dwc3-generic.c | 24 ++++++++++++------------
> > 1 file changed, 12 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/dwc3-generic.c
> > b/drivers/usb/dwc3/dwc3-generic.c index 78966718d0..e88e0b2e5a
> 100644
> > --- a/drivers/usb/dwc3/dwc3-generic.c
> > +++ b/drivers/usb/dwc3/dwc3-generic.c
> > @@ -93,21 +93,21 @@ static int dwc3_generic_probe(struct udevice *dev,
> > device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
> > rc = gpio_request_by_name(dev->parent, "reset-gpios", 0,
>
> Have a look at devm_gpiod_get_optional() , this might simplify the code.
More information about the U-Boot
mailing list