From: peter.chen@freescale.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 6/9] usb: chipidea: add vbus regulator control
Date: Fri, 8 Mar 2013 14:27:58 +0800 [thread overview]
Message-ID: <20130308062757.GB16076@nchen-desktop> (raw)
In-Reply-To: <20130307095248.GL9171@arwen.pp.htv.fi>
On Thu, Mar 07, 2013 at 11:52:48AM +0200, Felipe Balbi wrote:
> On Thu, Mar 07, 2013 at 10:41:03AM +0800, Peter Chen wrote:
> > On Wed, Mar 06, 2013 at 01:29:16PM +0200, Felipe Balbi wrote:
> > > Hi,
> > >
> > > On Wed, Mar 06, 2013 at 05:56:37PM +0800, Peter Chen wrote:
> > > > For boards which have board level vbus control (eg, gpio), we
> > > > need to operation vbus according to below rules:
> > > > - For host, the vbus should always be on.
> > > > - For otg, the vbus needs to be turned on/off when usb role switches.
> > > >
> > > > We put vbus operation to host as host is the only vbus user,
> > > > When we are at host mode, the vbus is on, when we are not at
> > > > host mode, vbus should be off.
> > > >
> > > > Signed-off-by: Peter Chen <peter.chen@freescale.com>
> > > > ---
> > > >
> > > > @@ -603,6 +594,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> > > >
> > > > ci->dev = dev;
> > > > ci->platdata = dev->platform_data;
> > > > + ci->reg_vbus = ci->platdata->reg_vbus;
> > >
> > > nak, teach ci_hdrc_probe() how to get its own regulator.
> > >
> > > > if (ci->platdata->phy)
> > > > ci->transceiver = ci->platdata->phy;
> > >
> > > this should happen for PHYs as well btw.
> >
> > Like I said at previous email, core code has NO DTS entry.
>
> that's your problem :-)
>
> You can just as well create both nodes in DTS file:
>
> ci13xx_fsl at foo {
> compatible = "fsl,chipidea";
> reg = <foo size>;
> blablabla
> ranges;
>
> chipidea_core at bar {
> compatible = "chipidea";
> reg <bar size>;
> blablabla
> };
> };
>
> then assign the regulator to chipidea itself, not to the glue.
No, that will make things more complicated at current chipidea driver.
Differ with dwc3, chipidea created its platform data at glue layer,
and chipidea core owing this data when platform device is created.
If we also want get things from DT node, we need to get node from
glue layer as this node is NOT belonged to chipidea core's pdev.
(We can't get it through compatible string as compatible string
is the same from every chipidea device)
Convert platform data to DT for chipidea core is a big job,
it is out of scope of this patch. If Alex also thinks we
are deserved to do it, I can do it later.
>
> --
> balbi
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2013-03-08 6:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 9:56 [PATCH v11 0/9] Add tested id switch and vbus connect detect support for Chipidea Peter Chen
2013-03-06 9:56 ` [PATCH v11 1/9] Revert "USB: chipidea: add vbus detect for udc" Peter Chen
2013-03-06 9:56 ` [PATCH v11 2/9] usb: chipidea: add otg file Peter Chen
2013-03-06 9:56 ` [PATCH v11 3/9] usb: chipidea: add otg id switch and vbus connect/disconnect detect Peter Chen
2013-03-06 17:09 ` Alexander Shishkin
2013-03-07 5:50 ` Peter Chen
2013-03-08 12:42 ` Peter Chen
2013-03-06 9:56 ` [PATCH v11 4/9] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state Peter Chen
2013-03-06 11:26 ` Felipe Balbi
2013-03-07 2:36 ` Peter Chen
2013-03-07 9:50 ` Felipe Balbi
2013-03-08 1:28 ` Peter Chen
2013-03-08 7:18 ` Felipe Balbi
2013-03-08 8:05 ` Peter Chen
2013-03-06 9:56 ` [PATCH v11 5/9] usb: chipidea: udc: retire the flag CI13_PULLUP_ON_VBUS Peter Chen
2013-03-06 9:56 ` [PATCH v11 6/9] usb: chipidea: add vbus regulator control Peter Chen
2013-03-06 11:29 ` Felipe Balbi
2013-03-07 2:41 ` Peter Chen
2013-03-07 9:52 ` Felipe Balbi
2013-03-08 6:27 ` Peter Chen [this message]
2013-03-08 7:26 ` Felipe Balbi
2013-03-08 8:32 ` Peter Chen
2013-03-08 8:42 ` Felipe Balbi
2013-03-08 8:52 ` Peter Chen
2013-03-08 8:58 ` Felipe Balbi
2013-03-06 9:56 ` [PATCH v11 7/9] usb: chipidea: delete the delayed work Peter Chen
2013-03-06 9:56 ` [PATCH v11 8/9] usb: chipidea: imx: add getting vbus regulator code Peter Chen
2013-03-06 10:11 ` Felipe Balbi
2013-03-07 2:18 ` Peter Chen
2013-03-06 9:56 ` [PATCH v11 9/9] usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget Peter Chen
2013-03-06 18:46 ` Russell King - ARM Linux
2013-03-07 2:48 ` Peter Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130308062757.GB16076@nchen-desktop \
--to=peter.chen@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox