Peter Chen <peter.chen@xxxxxxxxxxxxx> writes: > Since we need otgsc to know vbus's status at some chipidea > controllers even it is peripheral-only mode. Besides, some > SoCs (eg, AR9331 SoC) don't have otgsc register even > the DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS. > We inroduce otg_cap attribute to indicate if the controller > is otg capable, defaultly, we follow the rule that if DCCPARAMS_DC > and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS are otg capable, but if there > is exception, the platform can override it by device tree or platform data. > > Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> > --- [...] > diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h > index 118bf66..0a906b4 100644 > --- a/include/linux/usb/chipidea.h > +++ b/include/linux/usb/chipidea.h > @@ -7,6 +7,12 @@ > > #include <linux/usb/otg.h> > > +enum usb_otg_cap { > + OTG_CAP_ATTR_IS_NOT_EXISTED = 0, > + OTG_CAP_ATTR_IS_TRUE, > + OTG_CAP_ATTR_IS_FALSE, > +}; We don't really need all three, do we? We only need to know if the controller *can't* do otg. The rest we can infer from dr_mode and DCCPARAMS. So it can be another bit in flags rather than a separate field in platdata. Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html