summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Chen <marcochen@google.com>2020-12-01 20:26:36 +0800
committerCommit Bot <commit-bot@chromium.org>2020-12-07 01:40:30 +0000
commit4d0f6d74a5327dd70e57082332109a9aeec24e80 (patch)
treed877ca8f3cb9d9dfc6085d7b56ecb472d045d5d8
parent9094a1b13aaec6863d263042bdb4b6d9ecc48a65 (diff)
downloadchrome-ec-4d0f6d74a5327dd70e57082332109a9aeec24e80.tar.gz
max14637: add a config to define delay in ms from power off to on
BUG=b:173166535 BRANCH=octopus TEST=Change delay to 100; build and flash casta; verify whether BC12 can detect CDP/DCP/SDP correctly. TEST=`make -j buildall` Signed-off-by: Marco Chen <marcochen@chromium.org> Change-Id: I08cd881a2413e540eaaab3789f98e28f39514ad5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567197 Reviewed-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--driver/bc12/max14637.c2
-rw-r--r--include/config.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/driver/bc12/max14637.c b/driver/bc12/max14637.c
index d1c640a0f6..c7101b00ef 100644
--- a/driver/bc12/max14637.c
+++ b/driver/bc12/max14637.c
@@ -83,7 +83,7 @@ static void bc12_detect(const int port)
*/
msleep(100);
activate_chip_enable(cfg, 0);
- msleep(1);
+ msleep(CONFIG_BC12_MAX14637_DELAY_FROM_OFF_TO_ON_MS);
activate_chip_enable(cfg, 1);
new_chg.voltage = USB_CHARGER_VOLTAGE_MV;
diff --git a/include/config.h b/include/config.h
index c294f1384a..a5d215fb41 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4496,6 +4496,8 @@
#undef CONFIG_BC12_DETECT_PI3USB9281
/* Number of Pericom PI3USB9281 chips present in system */
#undef CONFIG_BC12_DETECT_PI3USB9281_CHIP_COUNT
+/* The delay in ms from power off to power on for MAX14637 */
+#define CONFIG_BC12_MAX14637_DELAY_FROM_OFF_TO_ON_MS 1
/* Enable USB serial console module. */