summaryrefslogtreecommitdiff
path: root/board/felwinter
diff options
context:
space:
mode:
authorJosh Tsai <josh_tsai@compal.corp-partner.google.com>2022-03-25 17:08:02 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-03-29 02:08:53 +0000
commita514bf6f080e9ed24e3ad174a390b6d511a676ac (patch)
treed160fe554531b07f730b3f0e14f16dfeacdd4b65 /board/felwinter
parent4823b90b2f569f47238e69af8f9bd93d3aae5307 (diff)
downloadchrome-ec-a514bf6f080e9ed24e3ad174a390b6d511a676ac.tar.gz
Felwinter: Fixed EN_PP5000_PEN doesn't deasserted when pen is plug-out
The first time we plug-out the pen, the pin EN_PP500_PEN does not deasserted. We need to record the initial pen detect status to avoid the EN_PP500_PEN status doesn't change when pen status is change at the first time BUG=b:196009529 BRANCH=brya TEST=ectool gpioget to check the EN_PP500_PEN status can be change when the pen status is changed at the first time. Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: I42bc4ecf1714919fe2193087adcb00462644b6ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3552606 Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/felwinter')
-rw-r--r--board/felwinter/board.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/felwinter/board.c b/board/felwinter/board.c
index 8eac363159..7f39e58336 100644
--- a/board/felwinter/board.c
+++ b/board/felwinter/board.c
@@ -144,6 +144,7 @@ static void pendetect_deferred(void)
gpio_set_level(GPIO_EN_PP5000_PEN, debounced_pen_detect);
}
DECLARE_DEFERRED(pendetect_deferred);
+DECLARE_HOOK(HOOK_INIT, pendetect_deferred, HOOK_PRIO_DEFAULT);
void pen_detect_interrupt(enum gpio_signal s)
{