Skip to content

Commit 405fea1

Browse files
Marcus CooperLee Jones
authored andcommitted
pm2301-charger: Always compile the PM2301 Charger driver with AB8500 Battery Mgnt
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 <marcus.xm.cooper@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Hakan BERG <hakan.berg@stericsson.com> Reviewed-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
1 parent d433766 commit 405fea1

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

‎drivers/power/Kconfig‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,6 @@ config BATTERY_GOLDFISH
353353
Say Y to enable support for the battery and AC power in the
354354
Goldfish emulator.
355355

356-
config CHARGER_PM2301
357-
bool "PM2301 Battery Charger Driver"
358-
depends on AB8500_BM
359-
help
360-
Say Y to include support for PM2301 charger driver.
361-
Depends on AB8500 battery management core.
362-
363356
source "drivers/power/reset/Kconfig"
364357

365358
endif # POWER_SUPPLY

‎drivers/power/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
3939
obj-$(CONFIG_BATTERY_JZ4740) += jz4740-battery.o
4040
obj-$(CONFIG_BATTERY_INTEL_MID) += intel_mid_battery.o
4141
obj-$(CONFIG_BATTERY_RX51) += rx51_battery.o
42-
obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o abx500_chargalg.o
42+
obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o abx500_chargalg.o pm2301_charger.o
4343
obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o
4444
obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o
4545
obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o
4646
obj-$(CONFIG_CHARGER_LP8727) += lp8727_charger.o
4747
obj-$(CONFIG_CHARGER_LP8788) += lp8788-charger.o
4848
obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o
4949
obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o
50-
obj-$(CONFIG_CHARGER_PM2301) += pm2301_charger.o
5150
obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o
5251
obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o
5352
obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o

‎drivers/power/ab8500_charger.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,10 +3387,10 @@ static int ab8500_charger_remove(struct platform_device *pdev)
33873387
flush_scheduled_work();
33883388
if (di->usb_chg.enabled)
33893389
power_supply_unregister(&di->usb_chg.psy);
3390-
#if !defined(CONFIG_CHARGER_PM2301)
3391-
if (di->ac_chg.enabled)
3390+
3391+
if (di->ac_chg.enabled && !di->ac_chg.external)
33923392
power_supply_unregister(&di->ac_chg.psy);
3393-
#endif
3393+
33943394
platform_set_drvdata(pdev, NULL);
33953395

33963396
return 0;

0 commit comments

Comments
 (0)