Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-18 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: Hi, On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: this method will be used to enable or disable the charge pump. Whenever we have DRD

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-15 Thread Peter Chen
On Thu, Mar 14, 2013 at 12:12:47PM +0200, Felipe Balbi wrote: Hi, On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter Chen wrote: @@ -160,6 +163,24 @@ usb_phy_shutdown(struct usb_phy *x) x-shutdown(x); } +static inline int +usb_phy_vbus_on(struct

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-15 Thread Felipe Balbi
On Fri, Mar 15, 2013 at 02:15:16PM +0800, Peter Chen wrote: On Thu, Mar 14, 2013 at 12:12:47PM +0200, Felipe Balbi wrote: Hi, On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter Chen wrote: @@ -160,6 +163,24 @@ usb_phy_shutdown(struct usb_phy *x) x-shutdown(x); }

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-15 Thread Peter Chen
On Fri, Mar 15, 2013 at 09:53:27AM +0200, Felipe Balbi wrote: On Fri, Mar 15, 2013 at 02:15:16PM +0800, Peter Chen wrote: On Thu, Mar 14, 2013 at 12:12:47PM +0200, Felipe Balbi wrote: Hi, On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter Chen wrote: @@ -160,6 +163,24 @@

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-15 Thread Felipe Balbi
Hi, On Fri, Mar 15, 2013 at 04:05:52PM +0800, Peter Chen wrote: @@ -160,6 +163,24 @@ usb_phy_shutdown(struct usb_phy *x) x-shutdown(x); } +static inline int +usb_phy_vbus_on(struct usb_phy *x) +{ + if

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-15 Thread Peter Chen
On Fri, Mar 15, 2013 at 10:11:04AM +0200, Felipe Balbi wrote: Hi, if you look at your PCB, VBUS, D+ and D- are directly routed to the PHY, not the USB controller itself. If you read ULPI and UTMI specs, you'll see that there are methods for the PHY to tell the USB controller about VBUS

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-14 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: Hi, On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: this method will be used to enable or disable the charge pump. Whenever we have DRD

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-14 Thread Felipe Balbi
Hi, On Thu, Mar 14, 2013 at 05:38:03PM +0800, Peter Chen wrote: @@ -160,6 +163,24 @@ usb_phy_shutdown(struct usb_phy *x) x-shutdown(x); } +static inline int +usb_phy_vbus_on(struct usb_phy *x) +{ + if (!x-set_vbus) +

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-10 Thread Peter Chen
On Fri, Mar 08, 2013 at 05:56:11PM +0200, Felipe Balbi wrote: Hi, On Fri, Mar 08, 2013 at 08:37:00PM +0800, Peter Chen wrote: On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: this method will be used to enable or disable the charge pump. Whenever we have DRD

Re: [PATCH 2/3] usb: phy: introduce -set_vbus() method

2013-03-08 Thread Peter Chen
On Fri, Mar 08, 2013 at 01:30:52PM +0200, Felipe Balbi wrote: this method will be used to enable or disable the charge pump. Whenever we have DRD devices, we need to be able to turn VBUS on or off whenever we want. Note that in the ideal case, this would be controlled by the ID-pin