Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209332

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

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management
Date 2015-08-18 18:20 +0200
Message-ID <pYRMe-2Xf-15@gated-at.bofh.it> (permalink)
References <pYRMe-2Xf-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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 < ARRAY_SIZE(wm831x_usb_limits); i++) {
> +               if (limit < wm831x_usb_limits[i] &&

The above check is intended to ensure that we don't go over the limit
that was passed in in the callback.  The goal is to select the highest
option that is less than the limit passed in.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Mark Brown <broonie@kernel.org> - 2015-08-18 18:20 +0200
  Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Mark Brown <broonie@kernel.org> - 2015-08-19 18:40 +0200

csiph-web