-/* $OpenBSD: dwiic.c,v 1.18 2024/08/17 02:14:20 deraadt Exp $ */
+/* $OpenBSD: dwiic.c,v 1.19 2024/08/17 02:24:03 deraadt Exp $ */
/*
* Synopsys DesignWare I2C controller
*
dwiic_activate(struct device *self, int act)
{
struct dwiic_softc *sc = (struct dwiic_softc *)self;
+ int rv;
switch (act) {
case DVACT_SUSPEND:
+ rv = config_activate_children(self, act);
/* disable controller */
dwiic_enable(sc, 0);
break;
case DVACT_RESUME:
dwiic_init(sc);
+ 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: dwiic_pci.c,v 1.28 2024/08/17 02:14:21 deraadt Exp $ */
+/* $OpenBSD: dwiic_pci.c,v 1.29 2024/08/17 02:24:06 deraadt Exp $ */
/*
* Synopsys DesignWare I2C controller
* PCI attachment
(LPSS_RESETS_I2C | LPSS_RESETS_IDMA));
break;
}
-
- dwiic_activate(self, act);
-
- return 0;
+ return dwiic_activate(self, act);
}
void