lkml.org 
[lkml]   [2015]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management
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])
> best = i;
> }

Yes, that's right.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-08-19 19:01    [W:0.076 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site