Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-09-01 Thread Peter Chen
On Thu, Sep 01, 2016 at 01:32:49PM +0530, Vaibhav Hiremath wrote: > > > On Monday 15 August 2016 02:43 PM, Peter Chen wrote: > >Some hard-wired USB devices need to do power sequence to let the > >device work normally, the typical power sequence like: enable USB > >PHY clock, toggle reset pin,

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-09-01 Thread Peter Chen
On Thu, Sep 01, 2016 at 01:32:49PM +0530, Vaibhav Hiremath wrote: > > > On Monday 15 August 2016 02:43 PM, Peter Chen wrote: > >Some hard-wired USB devices need to do power sequence to let the > >device work normally, the typical power sequence like: enable USB > >PHY clock, toggle reset pin,

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-09-01 Thread Vaibhav Hiremath
On Monday 15 August 2016 02:43 PM, Peter Chen wrote: Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-09-01 Thread Vaibhav Hiremath
On Monday 15 August 2016 02:43 PM, Peter Chen wrote: Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-23 Thread Alan Stern
On Tue, 23 Aug 2016, Peter Chen wrote: > I will add #ifdef CONFIG_OF for related code. And put the content at > hub_pwrseq_on at hub_probe directly, how about below? > > hub_probe() { > > ... > > if (hub_configure(hub, endpoint) >= 0) { > #ifdef CONFIG_OF >

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-23 Thread Alan Stern
On Tue, 23 Aug 2016, Peter Chen wrote: > I will add #ifdef CONFIG_OF for related code. And put the content at > hub_pwrseq_on at hub_probe directly, how about below? > > hub_probe() { > > ... > > if (hub_configure(hub, endpoint) >= 0) { > #ifdef CONFIG_OF >

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Peter Chen
On Mon, Aug 22, 2016 at 12:09:54PM -0400, Alan Stern wrote: > > > + > > > +static int hub_of_pwrseq_on(struct device_node *np, struct usb_hub *hub) > > > +{ > > > + struct pwrseq *pwrseq; > > > + struct usb_pwrseq_node *pwrseq_node; > > > + int ret; > > > + > > > + pwrseq = pwrseq_alloc_generic();

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Peter Chen
On Mon, Aug 22, 2016 at 12:09:54PM -0400, Alan Stern wrote: > > > + > > > +static int hub_of_pwrseq_on(struct device_node *np, struct usb_hub *hub) > > > +{ > > > + struct pwrseq *pwrseq; > > > + struct usb_pwrseq_node *pwrseq_node; > > > + int ret; > > > + > > > + pwrseq = pwrseq_alloc_generic();

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Alan Stern
On Mon, 22 Aug 2016, Peter Chen wrote: > On Mon, Aug 15, 2016 at 05:13:14PM +0800, Peter Chen wrote: > > Some hard-wired USB devices need to do power sequence to let the > > device work normally, the typical power sequence like: enable USB > > PHY clock, toggle reset pin, etc. But current Linux

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Alan Stern
On Mon, 22 Aug 2016, Peter Chen wrote: > On Mon, Aug 15, 2016 at 05:13:14PM +0800, Peter Chen wrote: > > Some hard-wired USB devices need to do power sequence to let the > > device work normally, the typical power sequence like: enable USB > > PHY clock, toggle reset pin, etc. But current Linux

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Peter Chen
On Mon, Aug 15, 2016 at 05:13:14PM +0800, Peter Chen wrote: > Some hard-wired USB devices need to do power sequence to let the > device work normally, the typical power sequence like: enable USB > PHY clock, toggle reset pin, etc. But current Linux USB driver > lacks of such code to do it, it may

Re: [PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-22 Thread Peter Chen
On Mon, Aug 15, 2016 at 05:13:14PM +0800, Peter Chen wrote: > Some hard-wired USB devices need to do power sequence to let the > device work normally, the typical power sequence like: enable USB > PHY clock, toggle reset pin, etc. But current Linux USB driver > lacks of such code to do it, it may

[PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-15 Thread Peter Chen
Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some hard-wired USB devices works abnormal or can't be

[PATCH v6 4/8] usb: core: add power sequence handling for USB devices

2016-08-15 Thread Peter Chen
Some hard-wired USB devices need to do power sequence to let the device work normally, the typical power sequence like: enable USB PHY clock, toggle reset pin, etc. But current Linux USB driver lacks of such code to do it, it may cause some hard-wired USB devices works abnormal or can't be