summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorDeepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>2021-10-09 02:31:40 +0530
committerCommit Bot <commit-bot@chromium.org>2021-10-28 17:58:06 +0000
commit6696cc47cd93e55db0989263da56dcb4316aeca1 (patch)
tree0cbf2f9d91c62b9816347ea633bc8aa6d0bfd560 /baseboard
parentfe70589e38a1f8abd36746bfb95c7a6196ca593f (diff)
downloadchrome-ec-6696cc47cd93e55db0989263da56dcb4316aeca1.tar.gz
cleanup: charger: Add BQ25710 sense resistor configs
Defined different sense register configs for BQ25710. All the charger chip driver implementation uses common sense register configs i.e CONFIG_CHARGER_SENSE_RESISTOR and CONFIG_CHARGER_SENSE_RESISTOR_AC. When we enable a charger driver for a platform, it is expected that the platform define these sense register configs. But ADLRVP requires two different charger drivers i.e ISL9241 and BQ25720 to be enabled to support all the variant builds. Hence BQ25710 driver is changed to use different sense register configs so that the configs defined for ISL9241 are not affected. BRANCH=none TEST=make -j buildall has no issues Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Change-Id: If1e1422246e2e3a5cb628d9a37c23790502b5ca4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3211773 Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/brya/prochot.c2
-rw-r--r--baseboard/hatch/baseboard.h4
-rw-r--r--baseboard/octopus/baseboard.h3
3 files changed, 5 insertions, 4 deletions
diff --git a/baseboard/brya/prochot.c b/baseboard/brya/prochot.c
index 2995bdaddf..b9cec7bba0 100644
--- a/baseboard/brya/prochot.c
+++ b/baseboard/brya/prochot.c
@@ -42,7 +42,7 @@ static int cal_sys_watt(void)
/* the ratio selectable through IADPT_GAIN bit. */
V_iadpt = Vacpacn * 1000 / 40;
- IDPM = V_iadpt / CONFIG_CHARGER_SENSE_RESISTOR_AC;
+ IDPM = V_iadpt / CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC;
adapter_voltage_v = charge_manager_get_charger_voltage() / 1000;
diff --git a/baseboard/hatch/baseboard.h b/baseboard/hatch/baseboard.h
index bf9140b33f..dc39fcf8ac 100644
--- a/baseboard/hatch/baseboard.h
+++ b/baseboard/hatch/baseboard.h
@@ -100,8 +100,8 @@
#undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1
#define CONFIG_CHARGE_RAMP_HW
-#define CONFIG_CHARGER_SENSE_RESISTOR 10
-#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
+#define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR 10
+#define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC 10
/*
* Don't allow the system to boot to S0 when the battery is low and unable to
* communicate on locked systems (which haven't PD negotiated)
diff --git a/baseboard/octopus/baseboard.h b/baseboard/octopus/baseboard.h
index 8b05c30f4c..f0ecab4d87 100644
--- a/baseboard/octopus/baseboard.h
+++ b/baseboard/octopus/baseboard.h
@@ -129,7 +129,8 @@
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_BQ25710
#define CONFIG_CHARGER_SENSE_RESISTOR_AC_ISL9238 20
- #define CONFIG_CHARGER_SENSE_RESISTOR_AC_BQ25710 10
+ #define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR_AC 10
+ #define CONFIG_CHARGER_BQ25710_SENSE_RESISTOR 10
#undef CONFIG_EXTPOWER_DEBOUNCE_MS
#define CONFIG_EXTPOWER_DEBOUNCE_MS 200