Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-16 Thread Baolin Wang
one if we're dealing with one of the core >> revisions that actually require the interrupt before >> moving on. >> >> Reported-by: Baolin Wang >> Signed-off-by: Felipe Balbi > > I've updated this one in order to fix the comment we had about d

Re: [PATCH v4] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-10-17 Thread Baolin Wang
Hi, On 17 October 2016 at 18:10, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> 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 >> unre

Re: [PATCH v4] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-10-17 Thread Baolin Wang
Hi, On 17 October 2016 at 19:53, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Baolin Wang writes: >>>> When we change the USB function with configfs dynamically, we possibly met >>>> this >>>> situation: one core is do

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
Hi, On 18 October 2016 at 15:19, Felipe Balbi wrote: > > Hi, > > Alan Stern writes: >>> Baolin Wang writes: >>> >> Felipe Balbi writes: >>> >>> Instead of just delaying for 100us, we should >>> >>> actually wait for End

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
On 18 October 2016 at 16:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Alan Stern writes: >>>>> Baolin Wang writes: >>>>> >> Felipe Balbi writes: >>>>> >>> Instead of just delaying for 100us, we sho

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

2016-10-18 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 Reviewe

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

2016-10-18 Thread Baolin Wang
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 Reviewed-by: Li Jun Tested-by: Li Jun --- drivers/usb

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

2016-10-18 Thread Baolin Wang
. Changes since v11: - Reviewed and tested by Li Jun. Changes since v10: - Introduce usb_charger_get_state() function 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: Intro

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

2016-10-18 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 75 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 78

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

2016-10-18 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 Reviewed-by: Li

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-18 Thread Baolin Wang
Hi, On 18 October 2016 at 16:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Sure. The problem I met was, when we change the USB function with >> configfs frequently, sometimes it will hang the system to crash. The >> reason is, we will start end tra

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-20 Thread Baolin Wang
Hi, On 19 October 2016 at 18:09, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> >> We should not check the DWC3_EP_ENABLED flag, since we will clear all >> flags in __dwc3_gadget_ep_disable() after setting >> DWC3_EP_END_TRANSFER_PENDING flags in d

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

2016-10-27 Thread Baolin Wang
Hi Felipe, On 19 October 2016 at 10:37, Baolin Wang 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 vendors must add this in thei

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

2016-10-28 Thread Baolin Wang
Hi, On 28 October 2016 at 06:00, NeilBrown wrote: > On Thu, Oct 27 2016, Baolin Wang wrote: > >> Hi Felipe, >> >> On 19 October 2016 at 10:37, Baolin Wang wrote: >>> Currently the Linux kernel does not provide any standard integration of this >>> feat

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

2016-10-31 Thread Baolin Wang
On 29 October 2016 at 01:03, Mark Brown wrote: > On Fri, Oct 28, 2016 at 08:51:41PM +0800, Baolin Wang wrote: >> On 28 October 2016 at 06:00, NeilBrown wrote: > >> > 1/ I think we agreed that it doesn't make sense for there to be >> > two chargers register

Re: [PATCH 75/82] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-31 Thread Baolin Wang
Hi Feilpe, On 31 October 2016 at 18:55, Felipe Balbi wrote: > > Hi Baolin, > > Felipe Balbi writes: >> From: Baolin Wang >> >> Instead of just delaying for 100us, we should >> actually wait for End Transfer Command Complete >> interrupt before moving

[PATCH v1] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-31 Thread Baolin Wang
minor improvements ] Signed-off-by: Baolin Wang --- drivers/usb/dwc3/core.h |8 drivers/usb/dwc3/gadget.c | 47 + 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 23

Re: [PATCH v1] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-31 Thread Baolin Wang
Hi, On 31 October 2016 at 20:53, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Instead of just delaying for 100us, we should >> actually wait for End Transfer Command Complete >> interrupt before moving on. Note that this should >> only be done i

[PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-10-31 Thread Baolin Wang
minor improvements ] Signed-off-by: Baolin Wang --- Changes since v1: - Move the suspend checking to right place to avoid checking twice. --- drivers/usb/dwc3/core.h |8 drivers/usb/dwc3/gadget.c | 49 + 2 files changed, 53 insertions(

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Baolin Wang
Hi, On 1 November 2016 at 19:01, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Changes since v1: >> - Move the suspend checking to right place to avoid checking twice. > > there is still one problem > >> @@ -1736,12 +1739,38 @@ static in

Re: [PATCH v2] usb: dwc3: gadget: wait for End Transfer to complete

2016-11-01 Thread Baolin Wang
Hi, On 1 November 2016 at 19:36, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Hi, >> >> On 1 November 2016 at 19:01, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: >>>> Changes sinc

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

2016-11-01 Thread Baolin Wang
Hi, On 31 October 2016 at 08:00, NeilBrown wrote: > On Fri, Oct 28 2016, Baolin Wang wrote: > >>> >>> 3/ usb_charger_notify_state() does nothing if the state doesn't change. >>> When the extcon detects an SDP, it will be called to set the state >&

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

2016-11-07 Thread Baolin Wang
On 3 November 2016 at 09:25, NeilBrown wrote: > On Tue, Nov 01 2016, Baolin Wang wrote: > > >>> So I won't be responding on this topic any further until I see a genuine >>> attempt to understand and resolve the inconsistencies with >>> usb_register_notif

Re: [PATCH v4] USB hub_probe: rework ugly goto-into-compound-statement

2016-11-09 Thread Baolin Wang
Hi, On 9 November 2016 at 23:35, Eugene Korenevsky wrote: > Rework smelling code (goto inside compound statement). Perhaps this is > legacy. Anyway such code is not appropriate for Linux kernel. > > Changes since v3: fix typo > Changes since v2: extract the code to static function > Changes since

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

2016-11-10 Thread Baolin Wang
Hi On 8 November 2016 at 04:36, NeilBrown wrote: > On Mon, Nov 07 2016, Baolin Wang wrote: > >> On 3 November 2016 at 09:25, NeilBrown wrote: >>> On Tue, Nov 01 2016, Baolin Wang wrote: >> >> I agree with your most opinions, but these are optimization.

Re: [PATCH v3 5/6] usb: dwc3: use bus->sysdev for DMA configuration

2016-11-10 Thread Baolin Wang
tested tag for patch 1/4/5 after fixing Felipe's issue. Tested-by: Baolin Wang -- 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 v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-11-14 Thread Baolin Wang
On 14 November 2016 at 12:21, NeilBrown wrote: > On Thu, Nov 10 2016, Baolin Wang wrote: > >> Hi >> >> On 8 November 2016 at 04:36, NeilBrown wrote: >>> On Mon, Nov 07 2016, Baolin Wang wrote: >>> >>>> On 3 November 2016 at 09:25, NeilBrow

[PATCH] usb: host: xhci: Remove unused 'addr_64' variable in xhci_hcd structure

2016-11-15 Thread Baolin Wang
Since the 'addr_64' variable as legacy is unused now, then remove it from xhci_hcd structure. Signed-off-by: Baolin Wang --- drivers/usb/host/xhci.h |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3e5922d..9dbaacf 10

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

2016-11-15 Thread Baolin Wang
e phy clock when disconnecting the slow USB decice, that will hang on the xHCI commands executing which depends on the phy clock. Thus we should disable USB2.0 phy suspend feature when dwc3 acts as host role. Signed-off-by: Baolin Wang --- drivers/usb/dwc3/core.c | 14 ++ 1 file ch

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

2016-11-15 Thread Baolin Wang
Hi, On 15 November 2016 at 18:49, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> When dwc3 controller acts as host role with attaching slow speed device >> (like mouse or keypad). Then if we plugged out the slow speed device, >> it will timeout to ru

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

2015-12-06 Thread Baolin Wang
On 6 December 2015 at 00:27, Sebastian Reichel wrote: > Hi, > > On Mon, Nov 16, 2015 at 02:33:31PM +0800, Baolin Wang wrote: >> +static ssize_t cur_limit_show(struct device *dev, >> + struct device_attribute *attr, >> +

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

2015-12-08 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang ---

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

2015-12-08 Thread Baolin Wang
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 --- drivers/usb/gadget/Kconfig |7 + drivers/usb/

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

2015-12-08 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/usb/gadg

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

2015-12-08 Thread Baolin Wang
. - Integrate with the vbus staff in the gadget API. - Spilt up the functionality for userspace with one file per USB charger type. Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting for

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

2015-12-08 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72

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

2016-01-03 Thread Baolin Wang
. - Integrate with the vbus staff in the gadget API. - Spilt up the functionality for userspace with one file per USB charger type. - Rebase on "4.4-rc7". Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrat

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

2016-01-03 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/usb/gadg

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

2016-01-03 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang ---

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

2016-01-03 Thread Baolin Wang
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 --- drivers/usb/gadget/Kconfig |7 + drivers/usb/

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

2016-01-03 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72

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

2016-01-07 Thread Baolin Wang
On 7 January 2016 at 19:25, Alex Shi wrote: > Hi, Baolin, > > There is similar gadget/charger driver on QC msm tree, > git://codeaurora.org/quic/la/kernel/msm-3.10 msm-3.10 > You may check that as a reference. > OK. Thanks. -- Baolin.wang Best Regards -- To unsubscribe from this list: send the

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

2016-01-24 Thread Baolin Wang
On 25 January 2016 at 11:44, Greg KH wrote: > On Mon, Jan 04, 2016 at 11:04:26AM +0800, Baolin Wang wrote: >> Currently the Linux kernel does not provide any standard integration of this >> feature that integrates the USB subsystem with the system power regulation >> prov

[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
#x27;s maxpacketsize. Signed-off-by: Baolin Wang --- 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 100644 --- a/drivers

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 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 ep's >> m

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 wrote: > > Hi, > > Baolin Wang writes: >> 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 ep's >> maxpacketsi

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 wrote: > > Hi again, > > Felipe Balbi writes: >> Michal Nazarewicz writes: >>> On Fri, Jul 08 2016, Baolin Wang wrote: >>>> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>>>> On Thu, Jul 07 2016,

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 wrote: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: >>>> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_alig

[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
#x27;s maxpacketsize. Signed-off-by: Baolin Wang Acked-by: Michal Nazarewicz --- 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 deletions(-) diff --git a/drivers/usb/gadg

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 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 vendors must add this in their ker

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 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 ep's >> m

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

2016-07-12 Thread Baolin Wang
#x27;s maxpacketsize. Signed-off-by: Baolin Wang Acked-by: Michal Nazarewicz --- Changelog: v2: - Simplify the method to get buffer length. v1: - Remove the in_ep modification. - Remove max_t() function. drivers/usb/gadget/function/f_midi.c | 11 +++ 1 file changed, 7 insertions(+),

[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 --- drivers/usb/host/xhci-plat.c |3 ++

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

2016-07-15 Thread Baolin Wang
issue. Signed-off-by: Baolin Wang --- 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/drivers/usb/dwc3/core.c

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

2016-07-15 Thread Baolin Wang
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

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

2016-07-15 Thread Baolin Wang
delay when suspending the xhci. Signed-off-by: Baolin Wang --- drivers/usb/dwc3/Kconfig |7 +++ drivers/usb/dwc3/core.c | 25 - drivers/usb/dwc3/core.h | 15 +++ drivers/usb/dwc3/host.c | 32 4 files changed, 78

[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 --- drivers/usb/host/xhci-plat.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH 1/4] usb: gadget: f_midi: fixed endianness when using wMaxPacketSize

2016-07-25 Thread Baolin Wang
Hi, On 26 July 2016 at 07:15, Felipe F. Tonello wrote: > USB spec specifies wMaxPacketSize to be little endian (as other properties), > so when using this variable in the driver we should convert to the current > CPU endianness if necessary. > > Signed-off-by: Felipe F. Tonello > --- > drivers/

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

2016-07-26 Thread Baolin Wang
Hi Felipe, On 26 July 2016 at 19:06, Felipe Ferreri Tonello wrote: > Hi Baolin, > > Sorry for not replying for previous emails because for some reason these > emails were archived. :( > > On 12/07/16 10:01, Baolin Wang wrote: >> Some gadget device (such

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

2016-08-01 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72

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

2016-08-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 Reviewed-by: Li

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

2016-08-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 Reviewe

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

2016-08-01 Thread Baolin Wang
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 Reviewed-by: Li Jun Tested-by: Li Jun --- drivers/usb

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

2016-08-01 Thread Baolin Wang
ic 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 drivers/power/wm831x_power.c

[PATCH] usb: core: Add runtime resume checking

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

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 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 issuing usb_dev_suspend(), i

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

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

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

2016-08-10 Thread Baolin Wang
On 10 August 2016 at 17:07, Peter Chen 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 wrote: >> > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> >> Hi G

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 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 wrote: >> > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang wrote: >> >> When t

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 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 wrote: >> > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang wrote: >> >&g

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 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 vendors must add this in their ker

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 wrote: > On Wed, 10 Aug 2016, Baolin Wang wrote: > >> >> >> For example: No slave attached> usb interface runtime suspend >> >> >> > usb device runtime suspend -> xhci suspend ->

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 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 is usb >> host function, but

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 wrote: > On Thu, Aug 11, 2016 at 11:11:08AM +0800, Baolin Wang wrote: >> On 10 August 2016 at 22:31, Alan Stern wrote: >> > On Wed, 10 Aug 2016, Baolin Wang wrote: >> > >> >> Considering strict power manag

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 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 wrote: >> > On Wed, 10 Aug 2016, Baolin Wang wrote: >> > >> >> >

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

2016-08-11 Thread Baolin Wang
On 11 August 2016 at 16:19, Peter Chen 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 wrote: >> > On Thu, Aug 11, 2016 at 11:08:52AM +0800, Baolin Wang wrote: >> >> Hi Al

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

2016-08-11 Thread Baolin Wang
On 11 August 2016 at 16:44, Peter Chen 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 >> >> >> (issued in choose_wakeup()), cause us

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 wrote: > > Hi, > > Baolin Wang writes: >> 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' &

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 wrote: > > Hi, > > Baolin Wang writes: >> For some mobile devices with strict power management, we also want to suspend >> the host when the slave is detached for power saving. >> >> Thus we add the host

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 wrote: > > Hi, > > Baolin Wang writes: >> Hi Felipe, >> >> On 18 August 2016 at 15:18, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: >>>> Now some

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 wrote: > > Hi, > > Baolin Wang writes: >> Hi Felipe, >> >> On 18 August 2016 at 15:33, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Baolin Wang writes: >>>> For s

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 wrote: > > Hi Baolin, > > Baolin Wang writes: >>>>>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c >>>>>> index e2e2487..162f17c 100644 >>>>>> ---

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 wrote: > Hi Felipe, > > On 1 August 2016 at 15:09, Baolin Wang wrote: >> Currently the Linux kernel does not provide any standard integration of this >> feature that integrates the USB subsystem with the system power regu

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 wrote: > > Hi, > > Baolin Wang 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 XHCI_LPM_SUPPORT quirk checking after >> adding hc

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

2016-09-07 Thread Baolin Wang
Hi Neil, On 6 September 2016 at 13:40, NeilBrown wrote: > On Mon, Aug 29 2016, Baolin Wang wrote: > >> Hi Felipe, >> >> On 11 August 2016 at 11:14, Baolin Wang wrote: >>> Hi Felipe, >>> >>> On 1 August 2016 at 15:09, Baolin Wang wrote: &

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 wrote: > On Thu, Sep 08 2016, Baolin Wang wrote: > >> Hi Neil, >> >> On 6 September 2016 at 13:40, NeilBrown wrote: >>> On Mon, Aug 29 2016, Baolin Wang wrote: >>> >>>> Hi Felipe, >>>> &g

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

2016-03-18 Thread Baolin Wang
On 16 March 2016 at 19:48, Felipe Balbi wrote: > > Hi Baolin, > > Baolin Wang writes: >> [ text/plain ] >> Currently the Linux kernel does not provide any standard integration of this >> feature that integrates the USB subsystem with the system power regulation >

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

2016-03-18 Thread Baolin Wang
On 16 March 2016 at 20:09, Oliver Neukum wrote: > On Wed, 2016-03-16 at 19:46 +0800, Baolin Wang wrote: >> This patch introduces the usb charger driver based on usb gadget that >> makes an enhancement to a power driver. It works well in practice but >> that requires a

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

2016-03-19 Thread Baolin Wang
. - Integrate with the vbus staff in the gadget API. - Spilt up the functionality for userspace with one file per USB charger type. - Rebase on "4.5-rc4". Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrat

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

2016-03-19 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72

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

2016-03-19 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/usb/gadg

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

2016-03-19 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang ---

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

2016-03-20 Thread Baolin Wang
On 16 March 2016 at 19:20, Mark Brown wrote: > On Wed, Mar 16, 2016 at 01:05:27PM +0200, Felipe Balbi wrote: >> Mark Brown writes: >> > On Mon, Feb 29, 2016 at 11:22:12PM +0900, Mark Brown wrote: >> >> On Mon, Jan 04, 2016 at 11:04:26AM +0800, Baolin Wang wrote: &g

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

2016-03-20 Thread Baolin Wang
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 --- drivers/usb/gadget/Kconfig |7 + drivers/usb/

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

2016-03-24 Thread Baolin Wang
detection. - Supply the notification mechanism to userspace when charger state is changed. - Integrate with the vbus staff in the gadget API. Baolin Wang (4): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting

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

2016-03-24 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang Acked-by: Lee Jones Acked-by: Charles Keepax Acked-by: Peter Chen Acked-by: Sebastian Reichel --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72

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

2016-03-24 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/usb/gadg

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

2016-03-24 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang ---

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

2016-03-24 Thread Baolin Wang
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 --- drivers/usb/gadget/Kconfig |7 + drivers/usb/

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

2016-03-27 Thread Baolin Wang
On 27 March 2016 at 16:22, Geert Uytterhoeven wrote: > On Thu, Mar 24, 2016 at 1:35 PM, Baolin Wang wrote: >> --- a/drivers/power/wm831x_power.c >> +++ b/drivers/power/wm831x_power.c >> @@ -13,6 +13,7 @@ >> #include >> #include >> #include >

<    1   2   3   4   5   6   >