RE: [PATCH 3/3] phy: renesas: rcar-gen3-usb2: enable/disable independent irqs

From: Yoshihiro Shimoda
Date: Tue Apr 09 2019 - 05:49:48 EST


Hello Fabrizio-san,

> From: Fabrizio Castro, Sent: Wednesday, April 3, 2019 7:49 PM
>
> Hello Yoshihiro-san,
>
> Thank you for your partch!
>
> > From: devicetree-owner@xxxxxxxxxxxxxxx <devicetree-owner@xxxxxxxxxxxxxxx> On Behalf Of Yoshihiro Shimoda
> > Sent: 01 April 2019 13:01
> > Subject: [PATCH 3/3] phy: renesas: rcar-gen3-usb2: enable/disable independent irqs
> >
> > Since the previous code enabled/disabled the irqs both OHCI and EHCI,
> > it is possible to cause unexpected interruptions. To avoid this,
> > this patch creates multiple phy instances from phandle and
> > enables/disables independent irqs by the instances.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
>
> Reviewed-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx>
> Tested-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx>

Thank you for your review and test!

<snip>
> > +static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
> > +{
> > + enum usb_dr_mode candidate = USB_DR_MODE_UNKNOWN, tmp;
> > + int i;
> > +
> > + /*
> > + * If one of device nodes has other dr_mode except UNKNOWN,
> > + * this function returns UNKNOWN.
> > + */
> > + for (i = 0; i < NUM_OF_PHYS; i++) {
> > + tmp = of_usb_get_dr_mode_by_phy(np, i);
>
> We are calling of_usb_get_dr_mode_by_phy with i == 0, but we don't document it
> in the dt-bindings document?

This (i == 0) is for backward compatibility. So, I'll add such a comment on the driver.

Best regards,
Yoshihiro Shimoda