[PATCH v16 4/4] power: wm831x_power: Support USB charger current limit management

2016-08-01 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-10 Thread Baolin Wang
('-ESHUTDOWN'), thus we should clear the runtime errors in choose_wakeup() function to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- changes since v1: - Modify the changelog to explain clearly. - Remove 'ret' variable in choose_wakeup(). --- drivers/usb/core/d

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-09 Thread Baolin Wang
Hi Greg, On 9 August 2016 at 18:26, Greg KH <gre...@linuxfoundation.org> wrote: > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang wrote: >> When the usb device has entered suspend state by runtime suspend method, and >> the sustem also try to enter suspend state by is

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
On 10 August 2016 at 17:07, Peter Chen <hzpeterc...@gmail.com> wrote: > On Wed, Aug 10, 2016 at 02:43:50PM +0800, Baolin Wang wrote: >> Hi Peter, >> >> On 10 August 2016 at 14:18, Peter Chen <hzpeterc...@gmail.com> wrote: >> > On Wed, Aug 10, 2016 at 10:

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Greg, On 10 August 2016 at 16:17, Greg KH <gre...@linuxfoundation.org> wrote: > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> Hi Greg, >> >> On 9 August 2016 at 18:26, Greg KH <gre...@linuxfoundation.org> wrote: >> > On Tue, Aug 09, 2

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Peter, On 10 August 2016 at 14:18, Peter Chen <hzpeterc...@gmail.com> wrote: > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> Hi Greg, >> >> On 9 August 2016 at 18:26, Greg KH <gre...@linuxfoundation.org> wrote: >> > On Tue, Aug 09, 2

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-08-10 Thread Baolin Wang
Hi Felipe, On 1 August 2016 at 15:09, Baolin Wang <baolin.w...@linaro.org> wrote: > Currently the Linux kernel does not provide any standard integration of this > feature that integrates the USB subsystem with the system power regulation > provided by PMICs meaning that either v

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-10 Thread Baolin Wang
On 10 August 2016 at 22:31, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 10 Aug 2016, Baolin Wang wrote: > >> Considering strict power management for mobile device, we should also power >> off the usb controller if there are no slaves attached even though it

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Alan, On 10 August 2016 at 22:25, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 10 Aug 2016, Baolin Wang wrote: > >> >> >> For example: No slave attached> usb interface runtime suspend >> >> >> > usb device runtime sus

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Baolin Wang
On 11 August 2016 at 16:44, Peter Chen <hzpeterc...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 04:41:27PM +0800, Baolin Wang wrote: >> >> >> >> >> >> OK. But that is a real problem. It will pm_runtime_resume() falied >> >> >> (i

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-11 Thread Baolin Wang
Hi Peter, On 11 August 2016 at 14:52, Peter Chen <hzpeterc...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:11:08AM +0800, Baolin Wang wrote: >> On 10 August 2016 at 22:31, Alan Stern <st...@rowland.harvard.edu> wrote: >> > On Wed, 10 Aug 2016, Baolin Wang wrote:

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Baolin Wang
Hi Peter, On 11 August 2016 at 14:54, Peter Chen <hzpeterc...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:08:52AM +0800, Baolin Wang wrote: >> Hi Alan, >> >> On 10 August 2016 at 22:25, Alan Stern <st...@rowland.harvard.edu> wrote: >> &

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-11 Thread Baolin Wang
On 11 August 2016 at 16:19, Peter Chen <hzpeterc...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 04:07:21PM +0800, Baolin Wang wrote: >> Hi Peter, >> >> On 11 August 2016 at 14:54, Peter Chen <hzpeterc...@gmail.com> wrote: >> > On Thu, Aug 11, 2016 at 11:

[PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data

2016-07-15 Thread Baolin Wang
Now some usb controllers (such as dwc3 controller) need 'XHCI_SLOW_SUSPEND' quirk when suspending the xhci, thus we need to add 'usb3_slow_suspend' member in xhci platform data to support this. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/host/xhci-plat.c

[PATCH 3/4] usb: dwc3: core: Move the mode setting to the right place

2016-07-15 Thread Baolin Wang
this issue. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 9466431..1485480 100644 --- a/drivers/usb/dwc3/core.c +++ b/d

Re: [PATCH v2] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-11 Thread Baolin Wang
On 11 July 2016 at 19:38, Michal Nazarewicz <min...@mina86.com> wrote: > On Mon, Jul 11 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an

[PATCH 0/4] Support dwc3 host suspend/resume

2016-07-15 Thread Baolin Wang
the host when slave device is detached or attached. Baolin Wang (4): usb: host: xhci: Move the xhci quirks checking to the right place usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data usb: dwc3: core: Move the mode setting to the right place usb: dwc3

[PATCH 4/4] usb: dwc3: core: Support the dwc3 host suspend/resume

2016-07-15 Thread Baolin Wang
suspending the xhci. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/Kconfig |7 +++ drivers/usb/dwc3/core.c | 25 - drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/host.c | 32 4

[PATCH 1/4] usb: host: xhci: Move the xhci quirks checking to the right place

2016-07-15 Thread Baolin Wang
It will reset the xhci quirks in xhci_gen_setup() function when xhci try to add one hcd, thus we need to move the XHCI_LPM_SUPPORT quirk checking after adding hcd. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/host/xhci-plat.c |8 1 file changed, 4 inse

[PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/function/f_midi.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 58fc199..2e3f11e

[PATCH v2] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Michal Nazarewicz <min...@mina86.com> --- Changelog since v1: - Remove the in_ep modification. - Remove max_t() function. drivers/usb/gadget/function/f_midi.c | 12 1 file changed, 8 insertions(+), 4 deleti

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:21, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffe

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:27, Felipe Balbi <ba...@kernel.org> wrote: > > Hi again, > > Felipe Balbi <ba...@kernel.org> writes: >> Michal Nazarewicz <min...@mina86.com> writes: >>> On Fri, Jul 08 2016, Baolin Wang wrote: >>>> On 7 July 2

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:04, Michal Nazarewicz <min...@mina86.com> wrote: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz <min...@mina86.com> wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: >>>> Some ga

Re: [PATCH v15 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-07-10 Thread Baolin Wang
Hi Felipe, On 1 July 2016 at 14:05, Baolin Wang <baolin.w...@linaro.org> wrote: > Currently the Linux kernel does not provide any standard integration of this > feature that integrates the USB subsystem with the system power regulation > provided by PMICs meaning that either v

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
On 7 July 2016 at 20:51, Michal Nazarewicz <min...@mina86.com> wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an

[PATCH] usb: core: Add runtime resume checking

2016-08-09 Thread Baolin Wang
, if it failed we should clear the runtime errors by pm_runtime_set_suspended() function to avoid runtime resume failure. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/core/driver.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/us

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Baolin Wang
Hi Felipe, On 30 June 2016 at 18:30, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> +static ssize_t charger_state_show(struct device *dev, >> + struct device_attribute *attr, >

[PATCH] usb: gadget: Add the gserial port checking in gs_start_tx()

2016-06-30 Thread Baolin Wang
Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/function/u_serial.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 3580f19..66a0910 100644 --- a/

[PATCH v15 2/4] usb: gadget: Support for the usb charger framework

2016-07-01 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

[PATCH v15 4/4] power: wm831x_power: Support USB charger current limit management

2016-07-01 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v15 1/4] usb: gadget: Introduce the usb charger framework

2016-07-01 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

[PATCH v15 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-07-01 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v15 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-07-01 Thread Baolin Wang
n to check charger state. - Remove the mutex lock in usb_charger_set_cur_limit_by_type() function in case will be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the

[PATCH v14 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-06-29 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v14 4/4] power: wm831x_power: Support USB charger current limit management

2016-06-29 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v14 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-06-29 Thread Baolin Wang
be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the usb gadget supporting for usb charger power: wm831x_power: Support USB charger current limit management dri

[PATCH v14 2/4] usb: gadget: Support for the usb charger framework

2016-06-29 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

[PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-29 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

Re: [PATCH v12 2/4] gadget: Support for the usb charger framework

2016-06-29 Thread Baolin Wang
Hi Felipe, On 29 June 2016 at 20:06, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>>> For supporting the usb charger, it adds the usb_charger_init() and >>>>>>>&

Re: [PATCH] usb: dwc3: gadget: Add the suspend state checking when stopping gadget

2016-06-20 Thread Baolin Wang
On 20 June 2016 at 16:15, Felipe Balbi <ba...@kernel.org> wrote: > Baolin Wang <baolin.w...@linaro.org> writes: > >> It will be crash to stop gadget when the dwc3 device had been into suspend >> state, thus we need to check if the dwc3 device had been into suspend

[PATCH v2] usb: dwc3: gadget: Add the suspend state checking when stopping gadget

2016-06-20 Thread Baolin Wang
It will be crash to stop gadget when the dwc3 device had been into suspend state, thus we need to check if the dwc3 device had been into suspend state when UDC try to stop gadget. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/gadget.c |3 +++ 1 file chan

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-05 Thread Baolin Wang
Hi Mathias, On 31 January 2017 at 21:14, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: > On 16.01.2017 12:56, Baolin Wang wrote: >> >> Hi Mathias, > > > Hi > > Sorry about the long review delay > CC Alan in case my pm assumptions need to be corrected

Re: [PATCH] usb: dwc3: wait for end transfer to complete before disable irq

2017-02-05 Thread Baolin Wang
Hi, On 31 January 2017 at 22:09, Tomasz Medrek wrote: > From: Chuansheng Liu > > Currently, in "for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++)", > it is waiting the DWC3_EP_END_TRANSFER_PENDING flag to be 0 which is > cleared in

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-05 Thread Baolin Wang
Hi Robert, On 26 January 2017 at 01:30, Robert Foss wrote: > Looks good to me. > > Feel free to add my r-b. OK, thanks for your reviewing. -- Baolin.wang Best Regards -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-21 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> (One possible approach would be to have the setup routine return >>>> different values for explicit and impl

Re: [PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
te to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Baolin-Wang/Introduce-usb-charger-framework-to-deal-with-the-usb-gadget-power-negotation/20170220-173051 > config: i386-randconfig-x015-201708 (attached as .config) > compiler: gcc-6 (Deb

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-20 Thread Baolin Wang
On 20 February 2017 at 23:10, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: > On 20.02.2017 04:47, Baolin Wang wrote: >> >> Hi Mathias, >> >> On 6 February 2017 at 13:26, Baolin Wang <baolin.w...@linaro.org> wrote: >>> >>> Hi Ma

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-16 Thread Baolin Wang
nsaction: token, data, and >> handshake. >> >> Also, data stages are already explicit. So your temporary flag might >> better be called "wants_explicit_status_stages". > > I stand corrected ;-) > >>> Then add support for that to each UDC and set

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-19 Thread Baolin Wang
Hi Mathias, On 6 February 2017 at 13:26, Baolin Wang <baolin.w...@linaro.org> wrote: > Hi Mathias, > > On 31 January 2017 at 21:14, Mathias Nyman > <mathias.ny...@linux.intel.com> wrote: >> On 16.01.2017 12:56, Baolin Wang wrote: >>> >>> Hi Mathia

Re: [PATCH RESEND v7 1/1] usb: xhci: plat: Enable async suspend/resume

2017-02-19 Thread Baolin Wang
enable(>dev); > + device_enable_async_suspend(>dev); > > return 0; > > -- > 2.11.0.453.g787f75f05 > Reviewed-by: Baolin Wang <baolin.w...@linaro.org> -- Baolin.wang Best Regards -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-19 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> (One possible approach would be to have the setup routine return >>>> different values for explicit and impl

[PATCH v19 1/4] usb: gadget: Introduce the usb charger framework

2017-02-20 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

[PATCH v19 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2017-02-20 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

[PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

[PATCH v19 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2017-02-20 Thread Baolin Wang
ur_limit_by_type() function in case will be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the usb gadget supporting for usb charger power: wm831x_power: Support USB

[PATCH v19 4/4] power: wm831x_power: Support USB charger current limit management

2017-02-20 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[RFC PATCH 3/3] usb: phy: fsl: Remove the set_power callback

2017-01-18 Thread Baolin Wang
Since the set_power callback did not do anything for power setting, then remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-fsl-usb.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/p

[RFC PATCH 1/3] usb: phy: ab8500: Remove the set_power callback

2017-01-18 Thread Baolin Wang
There are no users will use the vbus_draw variable set by set_power() callback to set the vbus current. Thus we can remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-ab8500-usb.c | 20 1 file changed, 20 deletions(-) diff

[RFC PATCH 2/3] usb: phy: msm: Remove the set_power callback

2017-01-18 Thread Baolin Wang
Since it will not set the PMIC current drawn from USB configuration by set_power callback, then remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-msm-usb.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/usb/phy/phy-msm

[RFC PATCH 0/3] Remove some dummy set_power callbacks

2017-01-18 Thread Baolin Wang
In future we plan to introduce USB charger to set PMIC current drawn from USB configuration, instead of using set_power callback in phy driver. Moreover in these 3 phy drivers, the set_power callback did not implement anything to set PMIC current, thus we should remove them. Baolin Wang (3

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread Baolin Wang
Hi John, On 19 January 2017 at 09:33, John Youn <john.y...@synopsys.com> wrote: > On 1/16/2017 2:38 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn <john.y...@synopsys.com> writes: >>>> Baolin Wang <baolin.w...@linaro.org> writes: >>

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread Baolin Wang
Hi John, On 19 January 2017 at 11:31, John Youn <john.y...@synopsys.com> wrote: > On 1/18/2017 7:12 PM, Baolin Wang wrote: >> Hi John, >> >> On 19 January 2017 at 09:33, John Youn <john.y...@synopsys.com> wrote: >>> On 1/16/2017 2:38 AM, Felipe Balb

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-01-16 Thread Baolin Wang
Hi Mathias, On 13 December 2016 at 15:49, Baolin Wang <baolin.w...@linaro.org> wrote: > Enable the xhci plat runtime PM for parent device to suspend/resume xhci. > Also call pm_runtime_get_noresume() in probe() function in case the parent > device doesn't call suspend/resume call

Re: [PATCH v5 2/2] usb: dwc3: core: Support the dwc3 host suspend/resume

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 18:28, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> For some mobile devices with strict power management, we also want to suspend >> the host when the slave is detached fo

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 19:29, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi, >> >> On 16 January 2017 at 18:56, Felipe Balbi <ba...@kernel.org> wrote: >>> >>> Hi, >

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 18:56, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When handing the SETUP packet by composite_setup(), we will release the >> dwc->lock. If we get the 'USB_GADGET_DELAYED_STATU

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 20:06, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi, >> >> On 16 January 2017 at 19:29, Felipe Balbi <ba...@kernel.org> wrote: >>> >>>

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Baolin Wang
Hi, On 17 January 2017 at 18:39, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>> Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>>> When handing the SETUP pac

Re: [PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data

2016-08-19 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 21:42, Felipe Balbi <ba...@kernel.org> wrote: > > Hi Baolin, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c >>>>>> inde

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-03-02 Thread Baolin Wang
Hi, On 28 February 2017 at 06:11, Alan Stern <st...@rowland.harvard.edu> wrote: > On Tue, 21 Feb 2017, Baolin Wang wrote: > >> On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: >> > >> > Hi, >> > >> > Baolin Wang <

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-09-08 Thread Baolin Wang
On 8 September 2016 at 15:31, NeilBrown <ne...@suse.com> wrote: > On Thu, Sep 08 2016, Baolin Wang wrote: > >> Hi Neil, >> >> On 6 September 2016 at 13:40, NeilBrown <nfbr...@novell.com> wrote: >>> On Mon, Aug 29 2016, Baolin Wang wrote: >>>

[PATCH] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-08 Thread Baolin Wang
the DEVCTRLHLT flag. Also adding some disconnect checking to avoid queuing any requests when the gadget is stopped. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/ep0.c|8 drivers/usb/dwc3/gadget.c | 32 +++- 2 files chang

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-09-08 Thread Baolin Wang
Hi Neil, On 6 September 2016 at 13:40, NeilBrown <nfbr...@novell.com> wrote: > On Mon, Aug 29 2016, Baolin Wang wrote: > >> Hi Felipe, >> >> On 11 August 2016 at 11:14, Baolin Wang <baolin.w...@linaro.org> wrote: >>> Hi Felipe, >>>

Re: [PATCH 1/4] usb: host: xhci: Move the xhci quirks checking to the right place

2016-08-30 Thread Baolin Wang
Hi Mathias, On 18 August 2016 at 15:17, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> It will reset the xhci quirks in xhci_gen_setup() function when xhci try to >> add one hcd, thus we need to move the X

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-09-09 Thread Baolin Wang
On 9 September 2016 at 07:13, NeilBrown <ne...@suse.com> wrote: > On Thu, Sep 08 2016, Baolin Wang wrote: > >> On 8 September 2016 at 15:31, NeilBrown <ne...@suse.com> wrote: >>> On Thu, Sep 08 2016, Baolin Wang wrote: >>>> >>>> Now the usb

[PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.c |1 + drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 21 + 4 files changed, 26 insertions(+) diff --git a/drivers/us

[PATCH v2 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-09 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v1: - Split into 2 separate ptaches. - Choose co

Re: [PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-29 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 19:52, Baolin Wang <baolin.w...@linaro.org> wrote: > When we change the USB function with configfs dynamically, we possibly met > this > situation: one core is doing the control transfer, another core is trying to > unregister the USB gadget

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-10-05 Thread Baolin Wang
Hi Felipe, >> But you do! >> The mA number from the USB configuration is passed to usb_gadget_vbus_draw. >> Your patch passes that to usb_charger_set_cur_limit_by_type() >> which calls __usb_charger_set_cur_limit_by_type() which will set the >> cur_limit for whichever type uchger->type currently

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-10-05 Thread Baolin Wang
Hi Felipe, On 5 October 2016 at 15:47, Felipe Balbi <ba...@kernel.org> wrote: > > Hi Baolin, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> But you do! >>>> The mA number from the USB configuration is passed

[RESEND PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-10-04 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 23 +++ 3 files changed, 27 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/

[RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-10-04 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Move disconnect checking into dwc3_send_gadget_

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-10-07 Thread Baolin Wang
Hi Neil, On 5 October 2016 at 18:44, NeilBrown <ne...@suse.com> wrote: > On Wed, Oct 05 2016, Felipe Balbi wrote: > >> Hi Baolin, >> >> Baolin Wang <baolin.w...@linaro.org> writes: >>>>> But you do! >>>>> The mA number f

[PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-19 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Move disconnect checking into dwc3_send_gadget_

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 17:58, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>>> index 1a33308..c9026ce 100644

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-09-18 Thread Baolin Wang
Hi Neil, Sorry for late reply due yo my holiday. On 10 September 2016 at 05:19, NeilBrown <ne...@suse.com> wrote: > On Fri, Sep 09 2016, Baolin Wang wrote: > >>> >>> In practice, the USB PHY and the Power manager will often be in the same >>> IC (the

Re: [PATCH v2 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-17 Thread Baolin Wang
Hi Felipe, Sorry for late reply due to my holiday. On 9 September 2016 at 18:47, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When system has stpped the gadget, we should avoid queuing any requests >> w

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-17 Thread Baolin Wang
Hi Felipe, On 9 September 2016 at 19:03, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> index 057739d..22787b6 100644 >> --- a/drivers

[PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 23 +++ 3 files changed, 27 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
Hi, On 22 September 2016 at 20:53, Felipe Balbi <ba...@kernel.org> wrote: > > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> static const struct usb_gadget_driver configfs_driver_template = { >>>> .bind

[PATCH] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
nected, configured. The original code was created by Badhri Jagan Sridharan, and I did some optimization. CC: Badhri Jagan Sridharan <bad...@google.com> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig|8 +++ drivers/usb/gadget

Re: [PATCH] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 18:58, Mark Brown <broo...@kernel.org> wrote: > On Thu, Sep 22, 2016 at 06:53:12PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan <bad...@google.com> >> >> Some USB managament on userspace (like Android system) rely on the uevent

[PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
nected, configured. The original code was created by Badhri Jagan Sridharan, and I did some optimization. Signed-off-by: Badhri Jagan Sridharan <bad...@google.com> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v1: - Add Badhri's Signed-off-by. --- drivers/

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 20:23, Greg KH <gre...@linuxfoundation.org> wrote: > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan <bad...@google.com> >> >> Some USB managament on userspace (like Android system)

Re: [PATCH 4/4] usb: dwc3: core: Support the dwc3 host suspend/resume

2016-08-18 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 15:33, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> For some mobile devices with strict power management, we also want to suspend >> the host when the slave is detached

Re: [PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data

2016-08-18 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 15:18, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Now some usb controllers (such as dwc3 controller) need 'XHCI_SLOW_SUSPEND' >> quirk when suspending the xhci, th

Re: [PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data

2016-08-18 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 20:25, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi Felipe, >> >> On 18 August 2016 at 15:18, Felipe Balbi <ba...@kernel.org> wrote: >>> >>>

Re: [PATCH 4/4] usb: dwc3: core: Support the dwc3 host suspend/resume

2016-08-18 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 20:25, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi Felipe, >> >> On 18 August 2016 at 15:33, Felipe Balbi <ba...@kernel.org> wrote: >>> &g

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-08-29 Thread Baolin Wang
Hi Felipe, On 11 August 2016 at 11:14, Baolin Wang <baolin.w...@linaro.org> wrote: > Hi Felipe, > > On 1 August 2016 at 15:09, Baolin Wang <baolin.w...@linaro.org> wrote: >> Currently the Linux kernel does not provide any standard integration of this >> feature

<    1   2   3   4   5   6   >