Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754310AbbHGDLX (ORCPT ); Thu, 6 Aug 2015 23:11:23 -0400 Received: from muru.com ([72.249.23.125]:42162 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753916AbbHGDLV (ORCPT ); Thu, 6 Aug 2015 23:11:21 -0400 Date: Thu, 6 Aug 2015 20:11:16 -0700 From: Tony Lindgren To: NeilBrown Cc: Sebastian Reichel , Samuel Ortiz , linux-pm@vger.kernel.org, David Woodhouse , linux-kernel@vger.kernel.org, real GTA04 owners , Dmitry Eremin-Solenikov , Pavel Machek , linux-omap@vger.kernel.org, Lee Jones Subject: Re: [PATCH 07/13] twl4030_charger: distinguish between USB current and 'AC' current Message-ID: <20150807031116.GH4215@atomide.com> References: <20150730001113.4012.18086.stgit@noble> <20150730001124.4012.48552.stgit@noble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150730001124.4012.48552.stgit@noble> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1188 Lines: 40 * NeilBrown [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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/