diff options
author | Marco Chen <marcochen@google.com> | 2020-12-01 20:26:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-07 02:14:28 +0000 |
commit | 6ab06ea9d28f9e92a6ec4edf81f3de7c373393d9 (patch) | |
tree | 76bf0d6533e5ef674e498b2e4f26c9317f1f13d7 | |
parent | c44112f2d8c9d4623970eac033efb4cd84badc1b (diff) | |
download | chrome-ec-6ab06ea9d28f9e92a6ec4edf81f3de7c373393d9.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/+/2573656
-rw-r--r-- | driver/bc12/max14637.c | 2 | ||||
-rw-r--r-- | include/config.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/driver/bc12/max14637.c b/driver/bc12/max14637.c index 053a236f92..e054ba5c57 100644 --- a/driver/bc12/max14637.c +++ b/driver/bc12/max14637.c @@ -81,7 +81,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 1441202ec9..c862c52ce3 100644 --- a/include/config.h +++ b/include/config.h @@ -3469,6 +3469,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. */ |