On Wed, Mar 20, 2013 at 11:11:09AM +0200, Alexander Shishkin wrote: > Peter Chen <peter.chen@xxxxxxxxxxxxx> writes: > > > On Thu, Mar 14, 2013 at 09:53:55AM +0100, Marc Kleine-Budde wrote: > >> On 03/14/2013 09:34 AM, Peter Chen wrote: > >> > Hi Alex and all, > >> > > >> > Currently, we have two problems to block chipidea driver coming > >> > development. > >> > > >> > As there are so many chipidea versions, we impossible to collect > >> > all to make a decision, it is better to cover most of the cases, > >> > and using device tree (or platform data) to cover exceptions > >> > if they exist. > >> > > >> > 1. USB Mode Problem > >> > How can we decide USB mode (gadget, host and otg) at driver, and > >> > how to read OTGSC register? Below is my pinion. > >> > > >> > - We get gadget or host support from CAP_DCCPARAMS(DCCPARAMS_DC or DCCPARAMS_HC), > >> > >> IIRC This is broken on mx25. The host only port gets into an error state > >> if you read this register. :( > > > > If there is an exception, you can use DT to override it. Eg: > > > > if (ci->dccparams_is_error) > > do not read DCCPARAMS; /* using DT dr_mode setting */ > > I know it's tempting to add more phandles to the device tree for every > possible exception, but let's try to resist the temptation. Yes, as less as DT entries. Your suggestion for dr_mode is ok, but we may need additional DT entry to know if it is otg capable, as dr_mode is the working mode. > > Regards, > -- > Alex > -- Best Regards, Peter Chen -- 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