From patchwork Fri Feb 15 12:44:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14864 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7B60B23E2E for ; Fri, 15 Feb 2013 12:46:26 +0000 (UTC) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by fiordland.canonical.com (Postfix) with ESMTP id 1E934A1828F for ; Fri, 15 Feb 2013 12:46:26 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id p1so2131427vbi.32 for ; Fri, 15 Feb 2013 04:46:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=FCiA7r+D9pEgQhmH3XBC9nmn80k/svTPs81CKGiO+hg=; b=bRVlivLvF/Swc3uCp4Bss/BsbGpneKhEZoO5HM9R3NZoZgAJAjdRhgP/XmNa6eQCvd nqLCHmAxL5ynzts1ylRf7hRDZv8pYXdVNreuTDCcn9KbbpDtcB8AZAay6m/DtjApRTNd YkiAnPogL/fOnIOLiNd1ulN7Oefvdy4/EkkjFAL3BsRBz9DE7q2doa1lRkZpCAgQM+ox nvW/qESgNGkmfCE19sLEoBcs4ni4I4JJZ1Fh5GwfcJIbpoxsn5FFebYHjxsut7bxUgfm WiTuacPIq4Nld51nDEezcjAHdlYRPitAlh4CM4gMyfs7jYTZuiCGe+vQ/4JurPM1hZVn Iwxw== X-Received: by 10.52.69.74 with SMTP id c10mr2626553vdu.3.1360932385620; Fri, 15 Feb 2013 04:46:25 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp10867vcb; Fri, 15 Feb 2013 04:46:24 -0800 (PST) X-Received: by 10.180.105.232 with SMTP id gp8mr5559908wib.33.1360932384410; Fri, 15 Feb 2013 04:46:24 -0800 (PST) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx.google.com with ESMTPS id hr11si1035727wib.81.2013.02.15.04.46.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:46:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.171 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.171 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f171.google.com with SMTP id hn17so1100364wib.4 for ; Fri, 15 Feb 2013 04:46:24 -0800 (PST) X-Received: by 10.180.85.97 with SMTP id g1mr5705784wiz.29.1360932383829; Fri, 15 Feb 2013 04:46:23 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id bs6sm5133904wib.4.2013.02.15.04.46.21 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:46:22 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, cbouatmailru@gmail.com, sameo@linux.intel.com, Marcus Cooper , Lee Jones Subject: [PATCH 19/40] pm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery Mgnt Date: Fri, 15 Feb 2013 12:44:49 +0000 Message-Id: <1360932310-30065-20-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360932310-30065-1-git-send-email-lee.jones@linaro.org> References: <1360932310-30065-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQl1/kPslE8XAMg+wv5qb+5eRSCLBg73piH54/MbRNlZrRY8a2ZSV2MekE1GhTAYKjPtrZgT From: Marcus Cooper The PM2301 Charger should always be available when using the AB8500 Battery Management system, we're ensuring this will be the case. Signed-off-by: Marcus Cooper Signed-off-by: Lee Jones Reviewed-by: Hakan BERG Reviewed-by: Mian Yousaf KAUKAB --- drivers/power/Kconfig | 7 ------- drivers/power/Makefile | 3 +-- drivers/power/ab8500_charger.c | 6 +++--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 1e47197..1ae5155 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -352,13 +352,6 @@ config BATTERY_GOLDFISH Say Y to enable support for the battery and AC power in the Goldfish emulator. -config CHARGER_PM2301 - bool "PM2301 Battery Charger Driver" - depends on AB8500_BM - help - Say Y to include support for PM2301 charger driver. - Depends on AB8500 battery management core. - source "drivers/power/reset/Kconfig" endif # POWER_SUPPLY diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 3f66436..eb520ea 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -39,7 +39,7 @@ obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o obj-$(CONFIG_BATTERY_JZ4740) += jz4740-battery.o obj-$(CONFIG_BATTERY_INTEL_MID) += intel_mid_battery.o obj-$(CONFIG_BATTERY_RX51) += rx51_battery.o -obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o abx500_chargalg.o +obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o abx500_chargalg.o pm2301_charger.o obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o @@ -47,7 +47,6 @@ obj-$(CONFIG_CHARGER_LP8727) += lp8727_charger.o obj-$(CONFIG_CHARGER_LP8788) += lp8788-charger.o obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o -obj-$(CONFIG_CHARGER_PM2301) += pm2301_charger.o obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index b5c7a39..6fea4fd 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c @@ -3387,10 +3387,10 @@ static int ab8500_charger_remove(struct platform_device *pdev) flush_scheduled_work(); if (di->usb_chg.enabled) power_supply_unregister(&di->usb_chg.psy); -#if !defined(CONFIG_CHARGER_PM2301) - if (di->ac_chg.enabled) + + if (di->ac_chg.enabled && !di->ac_chg.external) power_supply_unregister(&di->ac_chg.psy); -#endif + platform_set_drvdata(pdev, NULL); return 0;