diff options
author | Matt Wang <matt_wang@compal.corp-partner.google.com> | 2022-07-13 15:26:40 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-19 09:06:35 +0000 |
commit | 26944b35448a9171219ee5e25a0ae7ccd64e8b3d (patch) | |
tree | 9f274a60258d29cdab3c5d6e91f5f147aef9250b | |
parent | 3112d66701c5984a40343536fbf710fe9fa77748 (diff) | |
download | chrome-ec-26944b35448a9171219ee5e25a0ae7ccd64e8b3d.tar.gz |
kinox: modify the SIO_LEGO_EN_L for AIO button
Add the SIO_LEGO_EN_L control when using the AIO device.
SIO_LEGO_EN_L set to 0 can use the AIO power button.
SIO_LEGO_EN_L set to 1 cannot use the AIO power button.
BUG=b:238157622
BRANCH=none
TEST=Has been confirmed that the AIO power button has a function.
Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com>
Change-Id: I036a7e177de440f9cf056a778589d97ad5cc1dd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759836
Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
Commit-Queue: Ricky Chang <rickytlchang@chromium.org>
-rw-r--r-- | board/kinox/gpio.inc | 2 | ||||
-rw-r--r-- | board/kinox/power_detection.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/board/kinox/gpio.inc b/board/kinox/gpio.inc index 5c5f52ecc1..6e2784e081 100644 --- a/board/kinox/gpio.inc +++ b/board/kinox/gpio.inc @@ -58,7 +58,7 @@ GPIO(CPU_C10_GATE_L, PIN(6, 7), GPIO_INPUT) GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH) GPIO(GSC_EC_RECOVERY_BTN_OD, PIN(2, 2), GPIO_INPUT) -GPIO(SIO_LEGO_EN, PIN(9, 6), GPIO_INPUT | GPIO_PULL_UP) +GPIO(SIO_LEGO_EN_L, PIN(9, 6), GPIO_OUT_LOW) /* HDMI CEC */ /* TODO(b/197474873): Enable HDMI CEC */ diff --git a/board/kinox/power_detection.c b/board/kinox/power_detection.c index fdd88f1d4e..d930a7846e 100644 --- a/board/kinox/power_detection.c +++ b/board/kinox/power_detection.c @@ -291,11 +291,13 @@ void set_the_obp(int power_type_index, int adp_type) switch (adp_type) { case TIO1: case TIO2: + gpio_set_level(GPIO_SIO_LEGO_EN_L, 0); charge_manager_update_charge( CHARGE_SUPPLIER_PROPRIETARY, DEDICATED_CHARGE_PORT, &pi); break; case TINY: + gpio_set_level(GPIO_SIO_LEGO_EN_L, 1); charge_manager_update_charge(CHARGE_SUPPLIER_DEDICATED, DEDICATED_CHARGE_PORT, &pi); |