diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-01-12 21:05:31 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-13 02:57:22 +0000 |
commit | 56c558e075af0e10cd53eb4343892d58e5e478d8 (patch) | |
tree | cdd7d0913bce4bda80adf0044c854a35f74cf552 | |
parent | 4944a6407d23214212e12c49a972ecbd6a44aaea (diff) | |
download | chrome-ec-56c558e075af0e10cd53eb4343892d58e5e478d8.tar.gz |
drawcia: Check pen detection on init
The Pen detection is detecting by interrupt. However, it will
miss the event on init if stylus already into garage. This patch
adds checking pen detection on init.
BUG=none
BRANCH=firmware-dedede-13606.B-master
TEST=On Drawcia, Resume from battery cutoff.
Make sure stylus is charging.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I2bdc3bf028d466ad1b6e391fdb6ee7ec9d00cb6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2626787
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | board/drawcia/board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/drawcia/board.c b/board/drawcia/board.c index 5d2577bf07..6728eb1183 100644 --- a/board/drawcia/board.c +++ b/board/drawcia/board.c @@ -397,6 +397,10 @@ void board_init(void) gpio_enable_interrupt(GPIO_PEN_DET_ODL); + /* Make sure pen detection is triggered or not at sysjump */ + if (!gpio_get_level(GPIO_PEN_DET_ODL)) + gpio_set_level(GPIO_EN_PP5000_PEN, 1); + /* Charger on the MB will be outputting PROCHOT_ODL and OD CHG_DET */ sm5803_configure_gpio0(CHARGER_PRIMARY, GPIO0_MODE_PROCHOT, 1); sm5803_configure_chg_det_od(CHARGER_PRIMARY, 1); |