-/* $OpenBSD: qciic.c,v 1.6 2024/06/19 21:27:22 patrick Exp $ */
+/* $OpenBSD: qciic.c,v 1.7 2024/10/02 21:21:32 kettenis Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
uint16_t gpio_int_pin;
uint16_t gpio_int_flags;
struct aml_node *node;
+ int skip;
};
int qciic_acpi_match(struct device *, void *, void *);
uint16_t pin;
switch (AML_CRSTYPE(crs)) {
+ case LR_MEM32FIXED:
+ /* An MMIO address means this is not an I2C device. */
+ sc_crs->skip = 1;
+ break;
+
case LR_SERBUS:
if (crs->lr_serbus.type == LR_SERBUS_I2C) {
sc_crs->i2c_addr = crs->lr_i2cbus._adr;
aml_freevalue(&res);
/* Skip if not using this bus. */
- if (crs.i2c_bus != sc->sc_node)
+ if (crs.skip || crs.i2c_bus != sc->sc_node)
return 0;
acpi_attach_deps(acpi_softc, node->parent);