From: Fabio Baltieri <fabio.baltieri@linaro.org>
To: Felipe Balbi <balbi@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 3/5] usb: musb: ux500: add otg notifier support
Date: Wed, 6 Mar 2013 09:40:28 +0800 [thread overview]
Message-ID: <20130306014028.GA11205@balto.lan> (raw)
In-Reply-To: <20130304143810.GJ3397@arwen.pp.htv.fi>
Hello Felipe,
On Mon, Mar 04, 2013 at 04:38:10PM +0200, Felipe Balbi wrote:
> On Thu, Feb 28, 2013 at 11:38:52AM +0100, Fabio Baltieri wrote:
> > Add transceiver notifier event handling to the ux500 driver to set vbus
> > on specific transceiver events.
> >
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
> > ---
> > drivers/usb/musb/ux500.c | 41 +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
> > index 5b742ba..b20326bb 100644
> > --- a/drivers/usb/musb/ux500.c
> > +++ b/drivers/usb/musb/ux500.c
> > @@ -98,6 +98,36 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
> > musb_readb(musb->mregs, MUSB_DEVCTL));
> > }
> >
> > +static int musb_otg_notifications(struct notifier_block *nb,
> > + unsigned long event, void *unused)
> > +{
> > + struct musb *musb = container_of(nb, struct musb, nb);
> > +
> > + dev_dbg(musb->controller, "musb_otg_notifications %ld %s\n",
> > + event, otg_state_string(musb->xceiv->state));
> > +
> > + switch (event) {
> > + case USB_EVENT_ID:
> > + dev_dbg(musb->controller, "ID GND\n");
> > + ux500_musb_set_vbus(musb, 1);
> > + break;
> > + case USB_EVENT_VBUS:
> > + dev_dbg(musb->controller, "VBUS Connect\n");
>
> are you sure this is correct ? you're not doing anything in case of
> vbus event. Shouldn't you make sure your vbus is off ?
The implementation I'm taking as reference for this patches does not do
anything on VBUS event and as I can see from commmit history, it has
been based on the omap2430 one, that in turns used to just run phy_init
- and that's not implemented. But...
> What if your user uses a non-standard cable which has id-pin grounded
> on both sides ?
A cable with two micro/mini connectors with grounded IDs? Did you ever
encountered such a thing? I guess a ux500_musb_set_vbus(musb, 0) would
not hurt in that case.
Fabio
--
Fabio Baltieri
next prev parent reply other threads:[~2013-03-06 1:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 10:38 [PATCH 0/5] musb-ux500 and ab8500-usb updates Fabio Baltieri
2013-02-28 10:38 ` [PATCH 1/5] usb: musb: ux500_dma: add missing MEM resource check Fabio Baltieri
2013-02-28 10:38 ` [PATCH 2/5] usb: musb: ux500: implement musb_set_vbus Fabio Baltieri
2013-02-28 10:38 ` [PATCH 3/5] usb: musb: ux500: add otg notifier support Fabio Baltieri
2013-03-04 14:38 ` Felipe Balbi
2013-03-06 1:40 ` Fabio Baltieri [this message]
2013-03-06 8:54 ` Felipe Balbi
2013-03-07 1:58 ` Fabio Baltieri
2013-03-07 8:57 ` Fabio Baltieri
2013-03-07 9:10 ` Fabio Baltieri
2013-03-07 10:44 ` Felipe Balbi
2013-02-28 10:38 ` [PATCH 4/5] usb: otg: ab8500-usb: drop support for ab8500 pre v2.0 Fabio Baltieri
2013-02-28 10:38 ` [PATCH 5/5] usb: otg: ab8500-usb: update irq handling code Fabio Baltieri
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=20130306014028.GA11205@balto.lan \
--to=fabio.baltieri@linaro.org \
--cc=balbi@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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