mb/google/nissa/var/nivviks: Use interrupt with lock for pen detect GPIO
commit6cb787b19af7a52fb417c5111f09b0e4e11beda7
authorEric Lai <eric_lai@quanta.corp-partner.google.com>
Fri, 6 May 2022 07:26:13 +0000 (6 15:26 +0800)
committerWerner Zeh <werner.zeh@siemens.com>
Mon, 16 May 2022 04:51:04 +0000 (16 04:51 +0000)
tree4d0548bdcf731e65557a0e04c7a3f6adf19779df
parent2e96eebf011cb461e9ea7cb7bfbe66b28e8c3d54
mb/google/nissa/var/nivviks: Use interrupt with lock for pen detect GPIO

With GPIO_DRIVER_LOCK kernel driver can't change to IRQ. Thus, we need
to set it as INT in coreboot to make the IRQ work.

BUG=b:223476974
TEST=evtest work as expected.
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "PRP0001:00"
Supported events:
  Event type 0 (EV_SYN)
  Event type 5 (EV_SW)
    Event code 15 (SW_PEN_INSERTED) state 0
Properties:
Testing ... (interrupt to exit)
Event: type 5 (EV_SW), code 15 (SW_PEN_INSERTED), value 1
Event: -------------- SYN_REPORT ------------
Event: type 5 (EV_SW), code 15 (SW_PEN_INSERTED), value 0

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I5f9fdfb2622b4b955da216119e74c6f7d5795d36
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64091
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
src/mainboard/google/brya/variants/baseboard/nissa/gpio.c