diff options
author | Keith Short <keithshort@chromium.org> | 2019-08-20 11:06:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-18 03:31:44 +0000 |
commit | e9b16dbda0f7ec027c30e17905c4a737cdad2e02 (patch) | |
tree | d62bfe3fad5b377cff9ab30e62d34b8575b28ce5 /common | |
parent | 1af858387ff7ccdd656db77340fc81b3dc7e4453 (diff) | |
download | chrome-ec-e9b16dbda0f7ec027c30e17905c4a737cdad2e02.tar.gz |
config: Merge CONFIG_CHARGER_V2 into CONFIG_CHARGER
For all boards that defined CONFIG_CHARGER, CONFIG_CHARGER_V2 is also
defined. Remove references to CONFIG_CHARGER_V2 from board header files.
Replace CONFIG_CHARGER_V2 in common C modules with CONFIG_CHARGER when
appropriate.
BUG=b:139699769
BRANCH=none
TEST=make buildall -j
Change-Id: I6b54baf4ad2406bbed629b6b272dad9ea6a81280
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1789420
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/battery.c | 2 | ||||
-rw-r--r-- | common/build.mk | 3 | ||||
-rw-r--r-- | common/charger.c | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/common/battery.c b/common/battery.c index 7f00e186ec..3f858f6f27 100644 --- a/common/battery.c +++ b/common/battery.c @@ -206,7 +206,7 @@ static void print_battery_info(void) ccprintf("%d mAh (%d mAh with %d %% compensation)\n", value, value*batt_full_factor/100, batt_full_factor); -#ifdef CONFIG_CHARGER_V2 +#ifdef CONFIG_CHARGER print_item_name("Display:"); value = charge_get_display_charge(); ccprintf("%d.%d %%\n", value / 10, value % 10); diff --git a/common/build.mk b/common/build.mk index 693d3f236c..72288730f3 100644 --- a/common/build.mk +++ b/common/build.mk @@ -47,9 +47,8 @@ common-$(CONFIG_CHARGE_MANAGER)+=charge_manager.o common-$(CONFIG_CHARGE_RAMP_HW)+=charge_ramp.o common-$(CONFIG_CHARGE_RAMP_SW)+=charge_ramp.o charge_ramp_sw.o common-$(CONFIG_CMD_CHARGEN) += chargen.o -common-$(CONFIG_CHARGER)+=charger.o +common-$(CONFIG_CHARGER)+=charger.o charge_state_v2.o common-$(CONFIG_CHARGER_PROFILE_OVERRIDE_COMMON)+=charger_profile_override.o -common-$(CONFIG_CHARGER_V2)+=charge_state_v2.o common-$(CONFIG_CMD_I2CWEDGE)+=i2c_wedge.o common-$(CONFIG_COMMON_GPIO)+=gpio.o gpio_commands.o common-$(CONFIG_IO_EXPANDER)+=ioexpander.o diff --git a/common/charger.c b/common/charger.c index 2f3079d1b6..87d2f8e0ce 100644 --- a/common/charger.c +++ b/common/charger.c @@ -188,17 +188,13 @@ static int command_charger(int argc, char **argv) d = strtoi(argv[2], &e, 0); if (*e) return EC_ERROR_PARAM2; -#ifdef CONFIG_CHARGER_V2 chgstate_set_manual_current(d); -#endif /* CONFIG_CHARGER_V2 */ return charger_set_current(d); } else if (strcasecmp(argv[1], "voltage") == 0) { d = strtoi(argv[2], &e, 0); if (*e) return EC_ERROR_PARAM2; -#ifdef CONFIG_CHARGER_V2 chgstate_set_manual_voltage(d); -#endif /* CONFIG_CHARGER_V2 */ return charger_set_voltage(d); } else if (strcasecmp(argv[1], "dptf") == 0) { d = strtoi(argv[2], &e, 0); |