[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150818161200.GK10748@sirena.org.uk>
Date: Tue, 18 Aug 2015 09:12:00 -0700
From: Mark Brown <broonie@...nel.org>
To: Peter Chen <peter.chen@...escale.com>
Cc: Baolin Wang <baolin.wang@...aro.org>, balbi@...com,
linus.walleij@...aro.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, sojka@...ica.cz,
stern@...land.harvard.edu, r.baldyga@...sung.com,
yoshihiro.shimoda.uh@...esas.com, linux-usb@...r.kernel.org,
device-mainlining@...ts.linuxfoundation.org, sre@...nel.org,
dbaryshkov@...il.com, dwmw2@...radead.org, sameo@...ux.intel.com,
lee.jones@...aro.org, patches@...nsource.wolfsonmicro.com,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current
limit management
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.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists