[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)
On Fri, Feb 20, 2015 at 7:41 AM, Robert Baldyga <> wrote:
> Hi David,
> On 02/19/2015 08:59 PM, David Cohen wrote:
>> Some Intel platforms have an USB OTG port fully (or partially)
>> controlled by GPIOs:
>> (1) USB ID is connected directly to a pulled up GPIO.
>> Optionally:
>> (2) VBUS is enabled/disabled by a GPIO
>> (3) Platform has 2 USB controllers connected to same port: one for
>> device and one for host role. D+/- are switched between phys.
>> according to this GPIO level.
>> This driver configures USB OTG port for device or host role according to
>> USB ID value.
>> - If USB ID's GPIO level is low, OTG port is configured for host role
>> by sourcing VBUS and switching D+/- to host phy.
>> - If USB ID's GPIO level is high, by standard, the OTG port is
>> configured for device role by not sourcing VBUS and switching D+/- to
>> device controller.
> IMO it's not very elegant to handle VBUS power on/off in extcon driver.
> Creating fixed regulator would allow to make VBUS handling more generic.

IMHO it's just layers of abstraction piled on top of each other here.

I would put this adjacent to the phy driver somewhere in drivers/usb/*
and make the actual USB-driver thing handle its GPIOs directly.
But I guess David and Felipe have already discussed that as we're
seeing this patch?

Linus Walleij

 \ /
  Last update: 2015-02-20 11:01    [W:0.112 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site