Re: [RFC/PATCH 4/4] usb: dwc3: add basic PHY support

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

 



On Thu, Aug 09, 2012 at 10:07:20PM +0530, ABRAHAM, KISHON VIJAY wrote:
> Hi Felipe,
> 
> Other patches in this series looks fine. Have a few minor comments for
> this patch.
> 
> On Thu, Aug 9, 2012 at 8:54 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> > this will let us control PHYs on platforms which
> > need them.
> >
> > Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> > ---
> >  drivers/usb/dwc3/core.c | 15 +++++++++++++++
> >  drivers/usb/dwc3/core.h |  5 +++++
> >  2 files changed, 20 insertions(+)
> >
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > index c34452a..7df7331 100644
> > --- a/drivers/usb/dwc3/core.c
> > +++ b/drivers/usb/dwc3/core.c
> > @@ -50,6 +50,7 @@
> >  #include <linux/dma-mapping.h>
> >  #include <linux/of.h>
> >
> > +#include <linux/usb/otg.h>
> >  #include <linux/usb/ch9.h>
> >  #include <linux/usb/gadget.h>
> >
> > @@ -136,6 +137,8 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc)
> >         reg |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
> >         dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
> >
> > +       usb_phy_init(dwc->usb2_phy);
> > +       usb_phy_init(dwc->usb3_phy);
> >         mdelay(100);
> >
> >         /* Clear USB3 PHY reset */
> > @@ -465,6 +468,18 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
> >                 return -ENOMEM;
> >         }
> >
> > +       dwc->usb2_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> > +       if (!dwc->usb2_phy) {
> This should be IS_ERR_OR_NULL..
> 
> > +               dev_err(dev, "no usb2 phy configured\n");
> > +               return -ENODEV;
> We should return -EPROBE_DEFER so that it works fine if the phy's are
> getting created a little later in the boot sequence.
> > +       }
> > +
> > +       dwc->usb3_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB3);
> > +       if (!dwc->usb3_phy) {
> > +               dev_err(dev, "no usb3 phy configured\n");
> > +               return -ENODEV;
> > +       }
> Same comments as above for usb3 also.

Will fix your comments, thanks

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux