[PATCH v4 2/3] usb: gadget: rcar: Add support for reset controller
Michele Bisogno
micbis.openwrt at gmail.com
Thu Apr 23 10:14:56 CEST 2026
On Thu, 23 Apr 2026 at 05:02, Marek Vasut <marek.vasut at mailbox.org> wrote:
>
> On 4/22/26 6:59 PM, Michele Bisogno wrote:
>
> [...]
>
> > -static int usbhs_probe(struct usbhs_priv *priv)
> > +static int usbhs_probe(struct usbhs_priv *priv, struct udevice *dev)
> > {
> > int ret;
> >
> > @@ -396,21 +400,28 @@ static int usbhs_udc_otg_probe(struct udevice *dev)
> > {
> > struct usbhs_priv_otg_data *priv = dev_get_priv(dev);
>
> [...]
>
> > - ret = usbhs_probe(&priv->usbhs_priv);
> > + ret = usbhs_probe(&priv->usbhs_priv, dev);
>
> It would be sufficient to pass dev to usbhs_probe().
>
> usbhs_probe() can extract the struct usbhs_priv *priv from it:
>
> "
> struct usbhs_priv_otg_data *priv = dev_get_priv(dev);
> struct usbhs_priv *priv = &priv->usbhs_priv;
> "
OK, actually I thought about that but I was unsure which one was best.
> > if (ret < 0)
> > goto err_phy;
> >
> > @@ -440,7 +451,7 @@ static int usbhs_udc_otg_probe(struct udevice *dev)
> > err_phy:
> > generic_shutdown_phy(&priv->phy);
> > err_clk:
> > - clk_disable_bulk(&clk_bulk);
> > + clk_disable_bulk(&priv->clk_bulk);
>
> Reset likely needs to be handled in this fail path too ?
OK.
Thanks for your review and suggestions!
More information about the U-Boot
mailing list