summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/dwiic_acpi.c
diff options
context:
space:
mode:
authorJoshua Stein <jcs@cvs.openbsd.org>2019-07-22 14:37:07 +0000
committerJoshua Stein <jcs@cvs.openbsd.org>2019-07-22 14:37:07 +0000
commit9eaa639926cd482e5712a57777dd2d41317749a3 (patch)
tree8240383e97b5a609203d3ca299a6b22200ad8ac6 /sys/dev/acpi/dwiic_acpi.c
parentd98de6a33fbf3013598e78a4f06fd956b2dd094e (diff)
Even when polling is requested, install ihidev's interrupt handler
If an interrupt is received, turn off polling and rely on interrupts. This may happen after S3 resume. Also properly shut down polling during suspend and start it up again on resume only after dwiic is back in action.
Diffstat (limited to 'sys/dev/acpi/dwiic_acpi.c')
-rw-r--r--sys/dev/acpi/dwiic_acpi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c
index b03642402cc..620e65f6421 100644
--- a/sys/dev/acpi/dwiic_acpi.c
+++ b/sys/dev/acpi/dwiic_acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwiic_acpi.c,v 1.9 2019/07/16 19:12:32 jcs Exp $ */
+/* $OpenBSD: dwiic_acpi.c,v 1.10 2019/07/22 14:37:06 jcs Exp $ */
/*
* Synopsys DesignWare I2C controller
*
@@ -457,8 +457,9 @@ dwiic_acpi_found_ihidev(struct dwiic_softc *sc, struct aml_node *node,
aml_freevalue(&res);
- if (!sc->sc_poll_ihidev &&
- !(crs.irq_int == 0 && crs.gpio_int_node == NULL))
+ if (sc->sc_poll_ihidev)
+ ia.ia_poll = 1;
+ if (!(crs.irq_int == 0 && crs.gpio_int_node == NULL))
ia.ia_intr = &crs;
if (config_found(sc->sc_iic, &ia, dwiic_i2c_print)) {