summaryrefslogtreecommitdiff
path: root/board/kano/board.c
diff options
context:
space:
mode:
authorDavid Huang <david.huang@quanta.corp-partner.google.com>2021-08-16 17:58:40 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-23 04:32:27 +0000
commitb3d803095bb271f506c1eb00e45c66f7d99cb53e (patch)
treed2936b0351e3f9cacc88d4f77983911f09f51e9a /board/kano/board.c
parent745b4683e5e9dd9a26340906e68ae15ee775460c (diff)
downloadchrome-ec-b3d803095bb271f506c1eb00e45c66f7d99cb53e.tar.gz
kano: remove usb port C2 and board ID 1 related function
Remove usb port C2 and board ID 1 related function. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Ie051e44424bdf9e1de6d1b13afddea10ef85ff3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098121 Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/kano/board.c')
-rw-r--r--board/kano/board.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/board/kano/board.c b/board/kano/board.c
index 4385d7683f..3b8af7090b 100644
--- a/board/kano/board.c
+++ b/board/kano/board.c
@@ -52,10 +52,7 @@ static void board_chipset_resume(void)
{
/* Allow keyboard backlight to be enabled */
- if (get_board_id() == 1)
- gpio_set_level(GPIO_ID_1_EC_KB_BL_EN, 1);
- else
- gpio_set_level(GPIO_EC_KB_BL_EN_L, 0);
+ gpio_set_level(GPIO_EC_KB_BL_EN_L, 0);
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
@@ -64,10 +61,7 @@ static void board_chipset_suspend(void)
{
/* Turn off the keyboard backlight if it's on. */
- if (get_board_id() == 1)
- gpio_set_level(GPIO_ID_1_EC_KB_BL_EN, 0);
- else
- gpio_set_level(GPIO_EC_KB_BL_EN_L, 1);
+ gpio_set_level(GPIO_EC_KB_BL_EN_L, 1);
}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
@@ -109,56 +103,8 @@ enum battery_present battery_hw_present(void)
{
enum gpio_signal batt_pres;
- if (get_board_id() == 1)
- batt_pres = GPIO_ID_1_EC_BATT_PRES_ODL;
- else
- batt_pres = GPIO_EC_BATT_PRES_ODL;
+ batt_pres = GPIO_EC_BATT_PRES_ODL;
/* The GPIO is low when the battery is physically present */
return gpio_get_level(batt_pres) ? BP_NO : BP_YES;
}
-
-/*
- * Explicitly apply the board ID 1 *gpio.inc settings to pins that
- * were reassigned on current boards.
- */
-
-static void set_board_id_1_gpios(void)
-{
- if (get_board_id() != 1)
- return;
-
- gpio_set_flags(GPIO_ID_1_EC_KB_BL_EN, GPIO_OUT_LOW);
-}
-DECLARE_HOOK(HOOK_INIT, set_board_id_1_gpios, HOOK_PRIO_FIRST);
-
-/*
- * Reclaim GPIO pins on board ID 1 that are used as ADC inputs on
- * current boards. ALT function group MODULE_ADC pins are set in
- * HOOK_PRIO_INIT_ADC and can be reclaimed right after the hook runs.
- */
-
-static void board_id_1_reclaim_adc(void)
-{
- if (get_board_id() != 1)
- return;
-
- /*
- * GPIO_ID_1_USB_C0_C2_TCPC_RST_ODL is on GPIO34
- *
- * The TCPC has already been reset by board_tcpc_init() executed
- * from HOOK_PRIO_INIT_CHIPSET. Later, the pin gets set to ADC6
- * in HOOK_PRIO_INIT_ADC, so we simply need to set the pin back
- * to GPIO34.
- */
- gpio_set_flags(GPIO_ID_1_USB_C0_C2_TCPC_RST_ODL, GPIO_ODR_HIGH);
- gpio_set_alternate_function(GPIO_PORT_3, BIT(4), GPIO_ALT_FUNC_NONE);
-
- /*
- * The pin gets set to ADC7 in HOOK_PRIO_INIT_ADC, so we simply
- * need to set it back to GPIOE1.
- */
- gpio_set_flags(GPIO_ID_1_EC_BATT_PRES_ODL, GPIO_INPUT);
- gpio_set_alternate_function(GPIO_PORT_E, BIT(1), GPIO_ALT_FUNC_NONE);
-}
-DECLARE_HOOK(HOOK_INIT, board_id_1_reclaim_adc, HOOK_PRIO_INIT_ADC + 1);