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

2017-07-04 Thread Baolin Wang
Hi, On 3 July 2017 at 16:53, Charles Keepax wrote: > On Mon, Jul 03, 2017 at 02:07:15PM +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 >>

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

2017-07-04 Thread Baolin Wang
Hi, On 3 July 2017 at 23:50, Sebastian Reichel wrote: > Hi, > > On Mon, Jul 03, 2017 at 02:07:15PM +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

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

2017-07-03 Thread Sebastian Reichel
Hi, On Mon, Jul 03, 2017 at 02:07:15PM +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, allowing us to charge more quickly from high > current

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

2017-07-03 Thread Charles Keepax
On Mon, Jul 03, 2017 at 02:07:15PM +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, allowing us to charge more quickly from high > current inputs

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

2015-08-20 Thread David Laight
From: Baolin Wang Sent: 14 August 2015 10:48 +/* In miliamps */ Spelling police: milliamps +static unsigned int wm831x_usb_limits[] = { + 0, + 2, + 100, + 500, + 900, + 1500, + 1800, + 550, +}; David -- To unsubscribe from this list: send the

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 v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-19 Thread Mark Brown
On Wed, Aug 19, 2015 at 08:02:37AM +0800, Peter Chen wrote: Below code may be correct for the goal you expressed. for (i = 0; i ARRAY_SIZE(wm831x_usb_limits); i++) { if (limit = wm831x_usb_limits[i] wm831x_usb_limits[best] wm831x_usb_limits[i])

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

2015-08-18 Thread Peter Chen
On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote: + 1500, + 1800, + 550, +}; Why 550 is the last, but not 1800? You'd have to ask the hardware

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

2015-08-18 Thread Peter Chen
On Tue, Aug 18, 2015 at 09:12:00AM -0700, Mark Brown wrote: On Tue, Aug 18, 2015 at 01:20:12PM +0800, Peter Chen wrote: ok, I just had suspected below function's correctness, after looking it again, it always set 1800 as charging limit, does it be expected? + /* Find the highest

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

2015-08-18 Thread Felipe Balbi
On Mon, Aug 17, 2015 at 10:04:05PM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 06:58:16PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800,

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

2015-08-18 Thread Mark Brown
On Tue, Aug 18, 2015 at 01:20:12PM +0800, Peter Chen wrote: ok, I just had suspected below function's correctness, after looking it again, it always set 1800 as charging limit, does it be expected? + /* Find the highest supported limit */ + best = 0; + for (i = 0; i

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

2015-08-17 Thread Felipe Balbi
On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote: + 1500, + 1800, + 550, +}; Why 550 is the last, but not 1800? You'd have to ask the hardware

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

2015-08-17 Thread Mark Brown
On Mon, Aug 17, 2015 at 06:58:16PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote: + if (wm831x_pdata

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

2015-08-17 Thread Mark Brown
On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote: + 1500, + 1800, + 550, +}; Why 550 is the last, but not 1800? You'd have to ask the hardware engineers who designed the chip. I suspect it's because 550 was

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

2015-08-16 Thread Peter Chen
On Fri, Aug 14, 2015 at 05:47:46PM +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, allowing us to charge more quickly from high current inputs

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

2015-08-14 Thread Lee Jones
On Fri, 14 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 to charge more quickly from high current inputs without drawing more