Thread (1 message) 1 message, 1 author, 2014-11-05

Re: [PATCH v1 2/3] usb: phy: convert gpio-vbus to gpio_desc

From: Robert Jarzmik <hidden>
Date: 2014-11-05 20:02:04

Felipe Balbi [off-list ref] writes:
On Wed, Nov 05, 2014 at 08:46:58PM +0100, Robert Jarzmik wrote:
Well, let's add that :-) Just make it optional. It's pointless to have
80% duplicated code just because of 20% missing in phy-generic :-)

Then we avoid adding gpio-vbus specific DT properties too.
OK, got it.

It will take me a couple of days. Philipp, am I missing something apart the
detection and connect stuff ? While I'm at making my board work with
phy-generic, let's thing ahead.

Felipe, that will mean at least this for phy-generic :
 - usb_phy_gen_create_phy() will be enhanced
   => struct usb_phy_generic_platform_data will get a :
     - int gpio_vbus field (or whatever name you wish)
     - int gpio_vbus_inverted (or maybe we could go directly for gpio desc)
     - int gpio_pullup field (I'm not sure here, maybe we should just drop that)
     - bool wakeup field (or another name)
   => device tree will get :
     - a vbus-gpio (or another name)
     - a pullup-gpio (or nothing if we drop)
 - there will be a request_irq() and a workqueue (mostly taken from gpio-vbus)
   => will call usb_gadget_vbus_connect()
   => will call usb_gadget_vbus_disconnect()

I'm writing all this just to be sure I have the good picture before I start
coding.

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help