-/* $OpenBSD: iatp.c,v 1.9 2022/04/06 18:59:28 naddy Exp $ */
+/* $OpenBSD: iatp.c,v 1.10 2024/08/18 03:25:04 deraadt Exp $ */
/*
* Atmel maXTouch i2c touchscreen/touchpad driver
* Copyright (c) 2016 joshua stein <jcs@openbsd.org>
iatp_activate(struct device *self, int act)
{
struct iatp_softc *sc = (struct iatp_softc *)self;
+ int rv;
switch (act) {
case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
#if 0
/* XXX: causes dwiic troubles */
iatp_t7_set_power_mode(sc, MXT_T7_POWER_MODE_DEEP_SLEEP);
sc->sc_busy = 1;
iatp_init(sc);
sc->sc_busy = 0;
+ rv = config_activate_children(self, act);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
-
- config_activate_children(self, act);
-
- return 0;
+ return rv;
}
int
-/* $OpenBSD: ietp.c,v 1.2 2023/07/21 02:19:49 jcs Exp $ */
+/* $OpenBSD: ietp.c,v 1.3 2024/08/18 03:25:04 deraadt Exp $ */
/*
* Elan I2C Touchpad driver
*
ietp_activate(struct device *self, int act)
{
struct ietp_softc *sc = (struct ietp_softc *)self;
+ int rv;
DPRINTF(("%s(%d)\n", __func__, act));
switch (act) {
case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
sc->sc_dying = 1;
if (ietp_set_power(sc, I2C_HID_POWER_OFF))
printf("%s: failed to power down\n",
case DVACT_WAKEUP:
ietp_reset(sc);
sc->sc_dying = 0;
+ rv = config_activate_children(self, act);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
-
- config_activate_children(self, act);
-
- return 0;
+ return rv;
}
void
-/* $OpenBSD: ihidev.c,v 1.29 2023/08/12 10:03:05 kettenis Exp $ */
+/* $OpenBSD: ihidev.c,v 1.30 2024/08/18 03:25:04 deraadt Exp $ */
/*
* HID-over-i2c driver
*
ihidev_activate(struct device *self, int act)
{
struct ihidev_softc *sc = (struct ihidev_softc *)self;
+ int rv;
DPRINTF(("%s(%d)\n", __func__, act));
switch (act) {
case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
sc->sc_dying = 1;
if (sc->sc_poll && timeout_initialized(&sc->sc_timer)) {
DPRINTF(("%s: cancelling polling\n",
sc->sc_dying = 0;
if (sc->sc_poll && timeout_initialized(&sc->sc_timer))
timeout_add(&sc->sc_timer, 2000);
+ rv = config_activate_children(self, act);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
-
- config_activate_children(self, act);
-
- return 0;
+ return rv;
}
void