lkml.org 
[lkml]   [2015]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/13] twl4030_charger: distinguish between USB current and 'AC' current
* NeilBrown <neil@brown.name> [150729 17:28]:
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
> static int twl4030_charger_update_current(struct twl4030_bci *bci)
> {
> int status;
> + int cur;
> unsigned reg, cur_reg;
> u8 bcictl1, oldreg, fullreg;
> bool cgain = false;
> u8 boot_bci;
>
> + /*
> + * If AC (Accessory Charger) voltage exceeds 4.5V (MADC 11)
> + * and AC is enabled, set current for 'ac'
> + */
> + if (twl4030_get_madc_conversion(11) > 4500) {
> + cur = bci->ac_cur;
> + bci->ac_is_active = true;
> + } else {
> + cur = bci->usb_cur;
> + bci->ac_is_active = false;
> + }
> +
> /* First, check thresholds and see if cgain is needed */
> if (bci->ichg_eoc >= 200000)
> cgain = true;

Neil, you need a stub or something for twl4030_get_madc_conversion
if madc is not selected. Now at least omap2plus_defconfig and
ARM allmodconfig fails in Linux next.

Regards,

Tony


\
 
 \ /
  Last update: 2015-08-07 05:21    [W:0.197 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site