> > @@ -89,14 +89,34 @@ static struct ci13xxx_platform_data
> > ci13xxx_imx_platdata __devinitdata  = { .name                       =
> "ci13xxx_imx",
> >     .flags                  = CI13XXX_REQUIRE_TRANSCEIVER |
> >                               CI13XXX_PULLUP_ON_VBUS |
> > -                             CI13XXX_DISABLE_STREAMING,
> > +                             CI13XXX_DISABLE_STREAMING |
> > +                             CI13XXX_REGS_SHARED,
> 
> Why is this REGS_SHARED change needed?
> 

After adding this id switch/vbus detect support, this chipidea
driver's behavior is much like msm's. The udc code may run at 
non-device mode, the device/gadget code can't be freed even at
non-device mode.

 
> >
> > +static int ci13xxx_otg_set_vbus(struct usb_otg *otg, bool enabled)
> > +{
> > +
> > +   struct ci13xxx  *ci = container_of(otg, struct ci13xxx, otg);
> > +   struct regulator *reg_vbus = ci->reg_vbus;
> > +
> > +   WARN_ON(!reg_vbus);
> > +
> > +   if (reg_vbus) {
> 
> if (!reg_vbus) {
>       WARN and return;
> 
> }
> 
Even reg_vbus is null, there will be no oops, besides, WARN_ON will
print dump.

> 
> if (enabled)
> ...
> 
> You'll cut down on the indent and will make it more readable I believe.
> 
> [...]

Sorry, I can't understand you, can you give me an example?


Thanks,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to