From 95b0c851689ec406b5c47639f8bba1d288d06a56 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 30 Mar 2021 16:46:36 +0000 Subject: [PATCH] Register the PCI variant of dwiic(4) with acpi(4). ok tb@ --- sys/dev/pci/dwiic_pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/dwiic_pci.c b/sys/dev/pci/dwiic_pci.c index c332f209b40..792d12374f9 100644 --- a/sys/dev/pci/dwiic_pci.c +++ b/sys/dev/pci/dwiic_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwiic_pci.c,v 1.15 2020/12/25 21:48:27 jsg Exp $ */ +/* $OpenBSD: dwiic_pci.c,v 1.16 2021/03/30 16:46:36 kettenis Exp $ */ /* * Synopsys DesignWare I2C controller * PCI attachment @@ -225,7 +225,12 @@ dwiic_pci_attach(struct device *parent, struct device *self, void *aux) config_found((struct device *)sc, &sc->sc_iba, iicbus_print); - return; +#if NACPI > 0 && !defined(SMALL_KERNEL) + if (sc->sc_devnode) { + sc->sc_devnode->i2c = &sc->sc_i2c_tag; + acpi_register_gsb(acpi_softc, sc->sc_devnode); + } +#endif } int -- 2.20.1