-/* $OpenBSD: dwiic_acpi.c,v 1.19 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: dwiic_acpi.c,v 1.20 2022/08/31 15:14:01 kettenis Exp $ */
/*
* Synopsys DesignWare I2C controller
*
sc->sc_i2c_tag.ic_release_bus = dwiic_i2c_release_bus;
sc->sc_i2c_tag.ic_exec = dwiic_i2c_exec;
sc->sc_i2c_tag.ic_intr_establish = dwiic_i2c_intr_establish;
+ sc->sc_i2c_tag.ic_intr_disestablish = dwiic_i2c_intr_disestablish;
sc->sc_i2c_tag.ic_intr_string = dwiic_i2c_intr_string;
bzero(&sc->sc_iba, sizeof(sc->sc_iba));
level, func, arg, name);
}
+void
+dwiic_i2c_intr_disestablish(void *cookie, void *ih)
+{
+ /* XXX GPIO interrupts */
+ acpi_intr_disestablish(ih);
+}
+
const char *
dwiic_i2c_intr_string(void *cookie, void *ih)
{
-/* $OpenBSD: i2cvar.h,v 1.18 2022/02/09 07:58:24 visa Exp $ */
+/* $OpenBSD: i2cvar.h,v 1.19 2022/08/31 15:14:01 kettenis Exp $ */
/* $NetBSD: i2cvar.h,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
/*
void *(*ic_intr_establish)(void *, void *, int, int (*)(void *),
void *, const char *);
+ void (*ic_intr_disestablish)(void *, void *);
const char *(*ic_intr_string)(void *, void *);
} *i2c_tag_t;
#define iic_intr_establish(ic, ih, level, func, arg, name) \
(*(ic)->ic_intr_establish)((ic)->ic_cookie, (ih), (level), \
(func), (arg), (name))
+#define iic_intr_disestablish(ic, ih) \
+ (*(ic)->ic_intr_disestablish)((ic)->ic_cookie, (ih))
#define iic_intr_string(ic, ih) \
(*(ic)->ic_intr_string)((ic)->ic_cookie, (ih))
-/* $OpenBSD: ihidev.c,v 1.27 2022/05/20 05:03:45 anton Exp $ */
+/* $OpenBSD: ihidev.c,v 1.28 2022/08/31 15:14:01 kettenis Exp $ */
/*
* HID-over-i2c driver
*
struct ihidev_softc *sc = (struct ihidev_softc *)self;
if (sc->sc_ih != NULL) {
- intr_disestablish(sc->sc_ih);
+ iic_intr_disestablish(sc->sc_tag, sc->sc_ih);
sc->sc_ih = NULL;
}
-/* $OpenBSD: dwiicvar.h,v 1.4 2020/02/18 12:13:39 mpi Exp $ */
+/* $OpenBSD: dwiicvar.h,v 1.5 2022/08/31 15:14:01 kettenis Exp $ */
/*
* Synopsys DesignWare I2C controller
*
void * dwiic_i2c_intr_establish(void *, void *, int,
int (*)(void *), void *, const char *);
+void dwiic_i2c_intr_disestablish(void *, void *);
const char * dwiic_i2c_intr_string(void *, void *);
int dwiic_i2c_print(void *, const char *);