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

2015-08-08 Thread Baolin Wang
On 8 August 2015 at 01:52, Greg KH gre...@linuxfoundation.org wrote: On Fri, Aug 07, 2015 at 04:19:40PM +0800, Baolin Wang wrote: On 7 August 2015 at 13:34, Peter Chen peter.c...@freescale.com wrote: On Thu, Aug 06, 2015 at 03:03:47PM +0800, Baolin Wang wrote: Currently the Linux kernel does

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

2015-08-08 Thread Baolin Wang
On 8 August 2015 at 01:53, Greg KH gre...@linuxfoundation.org wrote: On Fri, Aug 07, 2015 at 05:22:47PM +0800, Baolin Wang wrote: On 7 August 2015 at 17:07, Peter Chen peter.c...@freescale.com wrote: /** * struct usb_udc - describes one usb device controller @@ -127,12 +128,45

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

2015-08-17 Thread Baolin Wang
On 17 August 2015 at 16:20, Li Jun b47...@freescale.com wrote: On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: On 17 August 2015 at 09:15, Li Jun b47...@freescale.com wrote: On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: On 14 August 2015 at 16:55, Li Jun b47

Re: [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-17 Thread Baolin Wang
On 18 August 2015 at 01:24, Mark Brown broo...@kernel.org wrote: On Mon, Aug 17, 2015 at 11:03:26AM +0800, Baolin Wang wrote: On 14 August 2015 at 23:27, Greg KH gre...@linuxfoundation.org wrote: On Fri, Aug 14, 2015 at 05:47:45PM +0800, Baolin Wang wrote: + * This program is free software

Re: [Device-mainlining] [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-17 Thread Baolin Wang
On 17 August 2015 at 23:25, Tim Bird tim.b...@sonymobile.com wrote: On 08/16/2015 08:03 PM, Baolin Wang via device-mainlining wrote: On 14 August 2015 at 23:27, Greg KH gre...@linuxfoundation.org wrote: On Fri, Aug 14, 2015 at 05:47:45PM +0800, Baolin Wang wrote: + * + * This program

[PATCH v3 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-18 Thread Baolin Wang
-by: Mark Brown broo...@kernel.org Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72 insertions(+) diff --git a/drivers/power/wm831x_power.c b/drivers

[PATCH v3 2/3] gadget: Introduce the usb charger framework

2015-08-18 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget

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

2015-08-18 Thread Baolin Wang
DEVICE_ATTR_RW()/ATTRIBUTE_GROUPS() and change the method to register the attruibutes. - Remove the 'name' and 'entry' member of struct 'usb_charger'. - Replace devm_kzalloc() with kzalloc() to follow the the lifetime rules. - Other modifications. Baolin Wang (3): gadget: Support for the usb charger

[PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget/udc/udc-core.c | 41 - include/linux/usb/gadget.h| 20 ++ 2 files changed, 60

Re: [PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-08-19 Thread Baolin Wang
On 20 August 2015 at 00:24, Mark Brown broo...@kernel.org wrote: On Wed, Aug 19, 2015 at 05:13:48PM +0800, Baolin Wang wrote: Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack

Re: [PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-19 Thread Baolin Wang
On 19 August 2015 at 20:56, Sergei Shtylyov sergei.shtyl...@cogentembedded.com wrote: Hello. On 8/19/2015 12:13 PM, Baolin Wang wrote: For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. Introduce

Re: [PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-08-19 Thread Baolin Wang
On 19 August 2015 at 17:56, Lee Jones lee.jo...@linaro.org wrote: On Wed, 19 Aug 2015, Baolin Wang wrote: Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack, allowing us

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-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. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

[PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-08-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 --- drivers/power/wm831x_power.c | 69

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-08-20 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 baolin.w...@linaro.org

Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-20 Thread Baolin Wang
On 20 August 2015 at 17:02, David Laight david.lai...@aculab.com wrote: From: Baolin Wang Sent: 14 August 2015 10:48 +/* In miliamps */ Spelling police: milliamps Hi David, I'll correct it in next patch series. Thanks for your comments. +static unsigned int wm831x_usb_limits

Re: [PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
On 19 August 2015 at 00:04, Greg KH gre...@linuxfoundation.org wrote: On Tue, Aug 18, 2015 at 07:14:19PM +0800, Baolin Wang wrote: The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism

[PATCH v4 2/5] gadget: Introduce the usb charger framework

2015-08-19 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-19 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. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-08-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 baolin.w...@linaro.org

[PATCH v4 1/5] gadget: Introduce the notifier functions

2015-08-19 Thread Baolin Wang
-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget/udc/udc-core.c | 32 include/linux/usb/gadget.h| 18 ++ 2 files changed, 50 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index

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

2015-08-19 Thread Baolin Wang
and split the patch to avoid breaking build. - Other modifications. Baolin Wang (5): gadget: Introduce the notifier functions gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting for usb charger power

[PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-08-19 Thread Baolin Wang
-by: Mark Brown broo...@kernel.org Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72 insertions(+) diff --git a/drivers/power/wm831x_power.c b/drivers

Re: [PATCH v2 1/3] gadget: Support for the usb charger framework

2015-08-16 Thread Baolin Wang
On 17 August 2015 at 08:40, Peter Chen peter.c...@freescale.com wrote: On Fri, Aug 14, 2015 at 05:47:44PM +0800, Baolin Wang wrote: The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism

Re: [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-16 Thread Baolin Wang
On 14 August 2015 at 23:27, Greg KH gre...@linuxfoundation.org wrote: On Fri, Aug 14, 2015 at 05:47:45PM +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 system

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

2015-08-17 Thread Baolin Wang
On 17 August 2015 at 09:15, Li Jun b47...@freescale.com wrote: On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: On 14 August 2015 at 16:55, Li Jun b47...@freescale.com wrote: Hi Baolin, On Fri, Aug 14, 2015 at 05:47:43PM +0800, Baolin Wang wrote: Currently the Linux kernel

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

2015-08-06 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget

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

2015-08-06 Thread Baolin Wang
On 7 August 2015 at 00:39, Greg KH gre...@linuxfoundation.org wrote: On Thu, Aug 06, 2015 at 03:03:48PM +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 system

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

2015-08-06 Thread Baolin Wang
not behave as they should. Providing a standard framework for doing this in the kernel. Baolin Wang (2): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework drivers/usb/gadget/charger.c | 547 + drivers/usb/gadget

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

2015-08-06 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget/udc/udc-core.c | 41 + include/linux/usb/gadget.h| 20 ++ 2 files changed, 61

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

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 16:31, Peter Chen peter.c...@freescale.com wrote: Peter, Thanks for your reviewing and comments. Now I just introduce the framework to review for more feedbacks and do not have a useful user to use it. I just can show you some example code to show how to use it. Thanks.

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

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:34, Peter Chen peter.c...@freescale.com wrote: On Thu, Aug 06, 2015 at 03:03:47PM +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 provided

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

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:41, Peter Chen peter.c...@freescale.com wrote: On Thu, Aug 06, 2015 at 03:03:48PM +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 system

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

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:45, Peter Chen peter.c...@freescale.com wrote: On Thu, Aug 06, 2015 at 03:03:49PM +0800, Baolin Wang wrote: The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism

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

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 17:07, Peter Chen peter.c...@freescale.com wrote: /** * struct usb_udc - describes one usb device controller @@ -127,12 +128,45 @@ void usb_gadget_giveback_request(struct usb_ep *ep, } EXPORT_SYMBOL_GPL(usb_gadget_giveback_request); +int

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

2015-08-14 Thread Baolin Wang
On 14 August 2015 at 16:55, Li Jun b47...@freescale.com wrote: Hi Baolin, On Fri, Aug 14, 2015 at 05:47:43PM +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

[PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-14 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget

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

2015-08-14 Thread Baolin Wang
the Kconfig and Makefile changes. - Add some attribute files to show or store the current limitation. - Introduce one user of usb charger by Mark Brown. - Other modifications. Baolin Wang (3): gadget: Support for the usb charger framework gadget: Introduce the usb charger framework power

[PATCH v2 1/3] gadget: Support for the usb charger framework

2015-08-14 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/usb/gadget/udc/udc-core.c | 38 + include/linux/usb/gadget.h| 20 +++ 2 files changed, 58

[PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-14 Thread Baolin Wang
-by: Mark Brown broo...@kernel.org Signed-off-by: Baolin Wang baolin.w...@linaro.org --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72 insertions(+) diff --git a/drivers/power/wm831x_power.c b/drivers

[PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-10-22 Thread Baolin Wang
It dose not work when we want to use the usb-to-serial port based on one usb gadget as a console. Thus this patch adds the console initialization to support this request. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |6 + drivers/usb/

Re: [PATCH v5 1/5] gadget: Introduce the notifier functions

2015-11-08 Thread Baolin Wang
On 7 November 2015 at 00:56, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Nov 06, 2015 at 07:35:10PM +0800, Baolin Wang wrote: >> #ifdef CONFIG_HAS_DMA >> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h >> index c14a69b..755e8bc 10

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

2015-11-15 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> --- drivers/usb/gadget/Kconfig |7 + drive

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

2015-11-15 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 v6 3/4] gadget: Integrate with the usb gadget supporting for usb charger

2015-11-15 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 <baolin.w...@linaro.

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

2015-11-15 Thread Baolin Wang
. - 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 for usb charger power: wm831x_power: Support USB charger current limit management

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

2015-11-15 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 10 ++ 2 files changed, 21 insertions(+) diff

[PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-15 Thread Baolin Wang
It dose not work when we want to use the usb-to-serial port based on one usb gadget as a console. Thus this patch adds the console initialization to support this request. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |6 + drivers/usb/

[PATCH v5 5/5] power: wm831x_power: Support USB charger current limit management

2015-11-06 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 v5 2/5] gadget: Introduce the usb charger framework

2015-11-06 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> --- drivers/usb/gadget/Kconfig |7 + drive

[PATCH v5 3/5] gadget: Support for the usb charger framework

2015-11-06 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. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

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

2015-11-06 Thread Baolin Wang
detection which combines the USB negotiation and PMICs detection. - Supply the notification mechanism to userspace when charger state is changed. - Integrate with the vbus staff in the gadget API. Baolin Wang (5): gadget: Introduce the notifier functions gadget: Introduce the usb charger

[PATCH v5 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-11-06 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 <baolin.w...@linaro.

[PATCH v5 1/5] gadget: Introduce the notifier functions

2015-11-06 Thread Baolin Wang
-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 32 include/linux/usb/gadget.h| 18 ++ 2 files changed, 50 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-17 Thread Baolin Wang
On 17 November 2015 at 21:34, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Mon, Nov 16, 2015 at 9:05 AM, Baolin Wang <baolin.w...@linaro.org> wrote: >> It dose not work when we want to use the usb-to-serial port based >> on one usb gadget as a console. Thus

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

2015-09-24 Thread Baolin Wang
and split the patch to avoid breaking build. - Other modifications. Baolin Wang (5): gadget: Introduce the notifier functions gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting for usb charger power

[PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-09-24 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 v4 2/5] gadget: Introduce the usb charger framework

2015-09-24 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/

[PATCH v4 1/5] gadget: Introduce the notifier functions

2015-09-24 Thread Baolin Wang
-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 32 include/linux/usb/gadget.h| 18 ++ 2 files changed, 50 insertions(+) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-09-24 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. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-09-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 <baolin.w...@linaro.

[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 <baolin.w...@linaro.

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

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

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

2015-12-08 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff

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

2015-12-08 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 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

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 <s...@kernel.org> 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 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:

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

2016-01-03 Thread Baolin Wang
will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/udc/udc-core.c | 11 +++ include/linux/usb/gadget.h| 11 +++ 2 files changed, 22 insertions(+) diff

[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 <baolin.w...@linaro.

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

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

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

2016-01-03 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

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

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 17:32, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Wed, Nov 18, 2015 at 4:15 AM, Baolin Wang <baolin.w...@linaro.org> wrote: >> On 17 November 2015 at 21:34, Andy Shevchenko <andy.shevche...@gmail.com> >> wrote: >>> On

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 20:05, David Laight <david.lai...@aculab.com> wrote: > From: Baolin Wang >> Sent: 18 November 2015 10:45 >> On 18 November 2015 at 17:32, Andy Shevchenko <andy.shevche...@gmail.com> >> wrote: >> > On Wed, Nov 18, 2015 at 4:

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
On 18 November 2015 at 23:32, Peter Hurley <pe...@hurleysoftware.com> wrote: > Hi Baolin, > > On 11/16/2015 02:05 AM, Baolin Wang wrote: >> It dose not work when we want to use the usb-to-serial port based >> on one usb gadget as a console. Thus this patch adds th

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-18 Thread Baolin Wang
> >> +{ >> + struct gscons_info *info = gserial_cons.data; >> + int port_num = gserial_cons.index; >> + struct usb_request *req; >> + struct gs_port *port; >> + struct usb_ep *ep; >> + >> + if (port_num >= MAX_U_SERIAL_PORTS || port_num < 0) { >> + pr_err("%s:

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-19 Thread Baolin Wang
On 19 November 2015 at 17:36, Peter Hurley <pe...@hurleysoftware.com> wrote: > On 11/19/2015 01:48 AM, Baolin Wang wrote: >>> >>>> +{ >>>> + struct gscons_info *info = gserial_cons.data; >>>> + int port_num = gserial_cons.index; >>

Re: [PATCH] usb: gadget: Add the console support for usb-to-serial port

2015-11-19 Thread Baolin Wang
On 19 November 2015 at 18:28, Peter Hurley <pe...@hurleysoftware.com> wrote: > On 11/18/2015 09:35 PM, Baolin Wang wrote: >> On 18 November 2015 at 23:32, Peter Hurley <pe...@hurleysoftware.com> wrote: >>> Hi Baolin, >>> >>> On 11/16/2015 02:05 AM,

[PATCH v2] usb: gadget: Add the console support for usb-to-serial port

2015-11-20 Thread Baolin Wang
-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig |6 + drivers/usb/gadget/function/u_serial.c | 258 2 files changed, 264 insertions(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 3

Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-06 Thread Baolin Wang
On 6 June 2016 at 22:59, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation time, tha

Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-08 Thread Baolin Wang
Hi, On 6 June 2016 at 22:59, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation t

[PATCH] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-03 Thread Baolin Wang
It will be failed when xhci device set the dma mask, if the xhci device dma_ops is dummy. Thus set the xhci device dma_ops from the parent device. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/host.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drive

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

2016-06-13 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

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

2016-06-13 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> --- drivers/usb/gadget/Kconfig |7 + drive

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

2016-06-13 Thread Baolin Wang
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): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate

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

2016-06-13 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

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

2016-06-13 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 and usb_charger_exit() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadg

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

2016-06-13 Thread Baolin Wang
From: Baolin Wang <baolin.w...@spreadtrum.com> 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 kernels or USB gadget d

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

2016-06-13 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> --- drivers/usb/gadget/Kconfig |7 + drive

[PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-05 Thread Baolin Wang
is 'dummy_dma_ops'. Changes since v1: - Add CONFIG_ARM64 macro. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/host.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index c679f63..edb666d 100644 --- a/drivers/us

[PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-25 Thread Baolin Wang
+0x50/0xb0 Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/gadget.c | 95 ++--- 1 file changed, 72 insertions(+), 23 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8e4a1b1..5d095f2

Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-26 Thread Baolin Wang
Hi Felipe, On 26 May 2016 at 14:22, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When handling the endpoint interrupt handler, it maybe disable the endpoint >> from another core user to set the USB en

Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-26 Thread Baolin Wang
On 26 May 2016 at 18:27, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On 26 May 2016 at 17:45, Felipe Balbi <ba...@kernel.org> wrote: >>> >>> Hi, >>> >>> B

Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

2016-05-26 Thread Baolin Wang
On 26 May 2016 at 17:45, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: > > > >>> Also note that the usb_endpoint_xfer_isoc() call on line 2067 of >>> gadget.c (as in my testing/next fro

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

2016-06-21 Thread Baolin Wang
On 21 June 2016 at 18:27, 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 >> usb_charger_exit() functions for usb charger initialization and e

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

2016-06-21 Thread Baolin Wang
On 21 June 2016 at 19:53, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> On 21 June 2016 at 19:03, Mark Brown <broo...@kernel.org> wrote: >>> On Tue, Jun 21, 2016 at 01:30:49PM +0300, Felipe Balbi wr

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

2016-06-21 Thread Baolin Wang
On 21 June 2016 at 19:49, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>> Can't you just tie a charger to a UDC and avoid the charger class >>> completely? >> >> Yeah, I also hope so. But we

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

2016-06-21 Thread Baolin Wang
On 21 June 2016 at 19:03, Mark Brown <broo...@kernel.org> wrote: > On Tue, Jun 21, 2016 at 01:30:49PM +0300, Felipe Balbi wrote: >> Baolin Wang <baolin.w...@linaro.org> writes: >> > @@ -607,8 +647,31 @@ static int wm831x_power_probe(stru

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

2016-06-21 Thread Baolin Wang
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): gadget: Introduce the usb charger framework gadget: Support

  1   2   3   4   5   6   >