Thread (20 messages) flat view 20 messages, 3 authors, 2013-04-02
STALE4880d

[PATCH 3/5] USB chipidea: introduce dual role mode pdata flags

From: alexander.shishkin@linux.intel.com (Alexander Shishkin)
Date: 2013-03-08 20:55:46

On 8 March 2013 18:52, Marc Kleine-Budde [off-list ref] wrote:
On 03/08/2013 05:46 PM, Alexander Shishkin wrote:
quoted
On 8 March 2013 18:33, Felipe Balbi [off-list ref] wrote:
quoted
Hi,

On Thu, Feb 28, 2013 at 11:57:02AM +0100, Marc Kleine-Budde wrote:
quoted
@@ -487,14 +488,23 @@ static int ci_hdrc_probe(struct platform_device *pdev)
              return -ENODEV;
      }

+     /* For now we treat dual-role as otg */
Btw, if we do this, Peter's otg code will try to access OTGSC, which
is not what we want on non-otg devices, so we'll need a clear
distinction between the two.
quoted
quoted
quoted
+     dr_mode = ci->platdata->dr_mode;
+     if (dr_mode == USB_DR_MODE_UNKNOWN || dr_mode == USB_DR_MODE_DUAL_ROLE)
+             dr_mode = USB_DR_MODE_OTG;
+
      /* initialize role(s) before the interrupt is requested */
-     ret = ci_hdrc_host_init(ci);
-     if (ret)
-             dev_info(dev, "doesn't support host\n");
+     if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) {
this is not something you should be passing via pdata; chipidea core
should know how to read this data by itself. Meaning that chipidea core
should be taught about devicetree. But make it optional since now all
users use DT.
And I don't think I like the idea of chipidea core calling into device
tree code directly.
Hmmm....this means draw :)
Well, we could go for something like

ci_hdrc-$(CONFIG_OF) += of.o

and try to contain the damage there, maybe? Ideas? I would very much
like to keep the clutter away from the core probe if possible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help