mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Cohen <david.a.cohen@linux.intel.com>
To: Peter Chen <peter.chen@freescale.com>
Cc: myungjoo.ham@samsung.com, cw00.choi@samsung.com,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	baolu.lu@linux.intel.com
Subject: Re: [RFC/PATCH] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)
Date: Wed, 24 Dec 2014 14:46:31 -0800	[thread overview]
Message-ID: <20141224224631.GB3175@psi-dev26.jf.intel.com> (raw)
In-Reply-To: <20141224030835.GA31424@shlinux2>

On Wed, Dec 24, 2014 at 11:08:52AM +0800, Peter Chen wrote:
> On Tue, Dec 23, 2014 at 11:40:23AM -0800, David Cohen wrote:
> > Hi Peter,
> > 
> > Thanks for the review.
> > 
> > On Tue, Dec 23, 2014 at 09:25:18AM +0800, Peter Chen wrote:
> > > On Mon, Dec 22, 2014 at 02:43:37PM -0800, David Cohen wrote:
> > > > Some platforms have an USB OTG port fully (or partially) controlled by
> > > > GPIOs:
> > > > 
> > > > (1) USB ID is connected directly to GPIO
> > > > 
> > > > Optionally:
> > > > (2) VBUS is enabled by a GPIO (when ID is grounded)
> > > > (3) Platform has 2 USB controllers connected to same port: one for
> > > >     device and one for host role. D+/- are switched between phys
> > > >     by GPIO.
> > > 
> > > Would you explain how it works? Choosing controller runtime?
> > 
> > Both controllers are (indirectly) connected to the same micro B port.
> > The D+/- goes from the port to a switch operated by a GPIO. From the
> > switch, D+/- may go to Host controller's phy or Device controller's phy.
> > Depends on the GPIO level.
> > 
> 
> Get it, why the design like that? If your controller supports both
> roles, the software can do role switch by ID pin (through gpio in your
> case).

It's really 2 controllers: 1 for each role. And the ID pin from port is
connected to GPIO only.

> 
> > > 
> > > > 
> > > > As per initial version, this driver has the duty to control whether
> > > > USB-Host cable is plugged in or not:
> > > 
> > > You mean Micro-AB cable, right?
> > 
> > > > +
> > > > +	vup->gpio_usb_mux = devm_gpiod_get_index(dev, "usb mux",
> > > > +						 VUPORT_GPIO_USB_MUX);
> > > > +	if (IS_ERR(vup->gpio_usb_mux))
> > > > +		dev_info(dev, "cannot request USB USB MUX, skipping it.\n");
> > > 
> > > Using dev_err
> > 
> > That's not really an error, although the IS_ERR() suggests otherwise.
> > The driver works well if a board doesn't need this mux (I'll add a
> > comment to state that clear). IMHO either keep dev_info or use dev_dgb
> > instead?
> > 
> 
> If that, dev_dbg may be suitable.

Ack.

Br, David

> 
> 
> -- 
> 
> Best Regards,
> Peter Chen

  reply	other threads:[~2014-12-24 22:45 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 22:43 David Cohen
2014-12-23  1:25 ` Peter Chen
2014-12-23 19:40   ` David Cohen
2014-12-24  3:08     ` Peter Chen
2014-12-24 22:46       ` David Cohen [this message]
2014-12-23 13:10 ` Sergei Shtylyov
2014-12-23 19:57   ` David Cohen
2014-12-23 20:09     ` Sergei Shtylyov
2014-12-23 20:43       ` David Cohen
2014-12-24  0:29 ` Felipe Balbi
2014-12-24 22:43   ` David Cohen
2014-12-26  4:49     ` Felipe Balbi
2015-02-17 19:18       ` David Cohen
2015-02-17 19:25         ` Felipe Balbi
2015-02-17 19:35           ` David Cohen
2015-02-18 10:17             ` Mika Westerberg
2015-02-18 17:53               ` David Cohen
2015-01-08 19:23 ` Linus Walleij
2015-02-17 19:20   ` David Cohen
2015-02-19 19:59 ` [PATCH v2] " David Cohen
2015-02-19 22:39   ` Paul Bolle
2015-02-20 19:02     ` David Cohen
2015-02-20 19:09       ` Felipe Balbi
2015-02-20 19:18         ` David Cohen
2015-02-20 19:10       ` Paul Bolle
2015-02-20 19:18         ` David Cohen
2015-02-20  6:41   ` Robert Baldyga
2015-02-20  9:53     ` Linus Walleij
2015-02-20 19:17       ` David Cohen
2015-02-20 19:36         ` Felipe Balbi
2015-02-20 19:59           ` David Cohen
2015-02-20 20:00             ` Felipe Balbi
2015-02-20 20:40               ` David Cohen
2015-03-07 20:03                 ` Linus Walleij
2015-02-24 19:18         ` David Cohen
2015-03-07 20:06         ` Linus Walleij
2015-03-09 16:16           ` Felipe Balbi
2015-03-09 19:10             ` David Cohen
2015-03-16 16:46               ` David Cohen
2015-03-16 16:46                 ` David Cohen
2015-03-19  8:18               ` Linus Walleij

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=20141224224631.GB3175@psi-dev26.jf.intel.com \
    --to=david.a.cohen@linux.intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=cw00.choi@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=peter.chen@freescale.com \
    /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

Powered by JetHome