From 8f365b07629612495509f08f9f22e38492a9dd98 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 10 Sep 2022 13:18:31 +0000 Subject: [PATCH] Don't restrict GPIO events to pin numbers below 256. With the _EVT() method events corresponding to larger numbers are possible. Fixes lid state detection on the x13s. ok patrick@ --- sys/dev/acpi/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 7571828aa01..ebb5249e822 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.415 2022/09/03 18:05:10 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.416 2022/09/10 13:18:31 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -902,7 +902,7 @@ acpi_gpio_parse_events(int crsidx, union acpi_resource *crs, void *arg) node = aml_searchname(devnode, (char *)&crs->pad[crs->lr_gpio.res_off]); pin = *(uint16_t *)&crs->pad[crs->lr_gpio.pin_off]; - if (crs->lr_gpio.type == LR_GPIO_INT && pin < 256 && + if (crs->lr_gpio.type == LR_GPIO_INT && node && node->gpio && node->gpio->intr_establish) { struct acpi_gpio *gpio = node->gpio; struct acpi_gpio_event *ev; -- 2.20.1