diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c --- a/sys/dev/gpio/acpi_gpiobus.c +++ b/sys/dev/gpio/acpi_gpiobus.c @@ -73,13 +73,15 @@ flags |= GPIO_INTR_SHAREABLE; #endif } - switch (gpio_res->IoRestriction) { - case ACPI_IO_RESTRICT_INPUT: - flags |= GPIO_PIN_INPUT; - break; - case ACPI_IO_RESTRICT_OUTPUT: - flags |= GPIO_PIN_OUTPUT; - break; + if (gpio_res->ConnectionType == ACPI_RESOURCE_GPIO_TYPE_IO) { + switch (gpio_res->IoRestriction) { + case ACPI_IO_RESTRICT_INPUT: + flags |= GPIO_PIN_INPUT; + break; + case ACPI_IO_RESTRICT_OUTPUT: + flags |= GPIO_PIN_OUTPUT; + break; + } } switch (gpio_res->PinConfig) {