Hi, On Wed, Nov 05, 2014 at 09:02:04PM +0100, Robert Jarzmik wrote: > Felipe Balbi <balbi@xxxxxx> 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) Actually, you might want to first convert phy-generic to gpio_desc and avoid the inverted field. > - int gpio_pullup field (I'm not sure here, maybe we should just drop that) > - bool wakeup field (or another name) sonds good to me. > => device tree will get : > - a vbus-gpio (or another name) > - a pullup-gpio (or nothing if we drop) fine by me, as long as their all optional and agreed with devicetree folks. I think we still have time for v3.19 if you manage to finish this before next week's end. > - 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() the workqueue should be unnecessary if you use devm_request_threaded_irq() without a top half. > I'm writing all this just to be sure I have the good picture before I > start coding. sounds good to me :-) When it comes to DT, let's try to keep things as generic as possible so we can just move phy-generic.c into drivers/phy/ later on without much effort ;-) I guess everything that you need already has existent bindings. cheers -- balbi
Attachment:
signature.asc
Description: Digital signature