diff options
author | Josie Nordrum <JosieNordrum@google.com> | 2020-10-14 13:38:29 -0600 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-10-16 18:23:54 +0000 |
commit | 3f1de9add900305730a28be919a21a682ae6b224 (patch) | |
tree | 4ab62480b59bbd38a42e9d0c95746b309aef5a93 /src/acpi/acpigen_dsm.c | |
parent | efe581254e010353bf340731b4a251c3edf777bc (diff) |
acpi/acpigen_dsm: fix I2C HID DSM to report correct function support
Fix DSM function 0 (query function) to correctly report function support
for its revision. Revision 1 should return 0x3 because I2C HID supports
only 1 additional function. All other revisions should return 0.
BUG=b:170862147
BRANCH=Zork
TEST=ensure no dmesg errors; disassemble and verify SSDT
Signed-off-by: Josie Nordrum <JosieNordrum@google.com>
Change-Id: Iee082ef5cf44c4cf7ab304345af56f3b5173ca56
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46429
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi/acpigen_dsm.c')
-rw-r--r-- | src/acpi/acpigen_dsm.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/acpi/acpigen_dsm.c b/src/acpi/acpigen_dsm.c index 2336537d0b..fc53ddff4d 100644 --- a/src/acpi/acpigen_dsm.c +++ b/src/acpi/acpigen_dsm.c @@ -7,28 +7,27 @@ #define ACPI_DSM_I2C_HID_UUID "3CDFF6F7-4267-4555-AD05-B30A3D8938DE" +/* I2C HID currently supports revision 1 only, for which, only 1 additional + * function is supported. Thus, the query function should return 0x3: + * bit 0 = additional function supported + * bit 1 = function with index 1 supported + * All other revisions do not support additional functions and hence return 0 +*/ + static void i2c_hid_func0_cb(void *arg) { /* ToInteger (Arg1, Local2) */ acpigen_write_to_integer(ARG1_OP, LOCAL2_OP); - /* If (LEqual (Local2, 0x0)) */ - acpigen_write_if_lequal_op_int(LOCAL2_OP, 0x0); - /* Return (Buffer (One) { 0x1f }) */ - acpigen_write_return_singleton_buffer(0x1f); - acpigen_pop_len(); /* Pop : If */ - /* Else */ - acpigen_write_else(); - /* If (LEqual (Local2, 0x1)) */ + /* If (LEqual (Local2, 0x1)) */ acpigen_write_if_lequal_op_int(LOCAL2_OP, 0x1); - /* Return (Buffer (One) { 0x3f }) */ - acpigen_write_return_singleton_buffer(0x3f); + /* Return (Buffer (One) { 0x3 }) */ + acpigen_write_return_singleton_buffer(0x3); acpigen_pop_len(); /* Pop : If */ - /* Else */ + /* Else */ acpigen_write_else(); /* Return (Buffer (One) { 0x0 }) */ acpigen_write_return_singleton_buffer(0x0); acpigen_pop_len(); /* Pop : Else */ - acpigen_pop_len(); /* Pop : Else */ } static void i2c_hid_func1_cb(void *arg) |