svn commit: r267207 - projects/pmac_pmu/sys/powerpc/powermac

Justin Hibbits jhibbits at FreeBSD.org
Sat Jun 7 05:09:42 UTC 2014


Author: jhibbits
Date: Sat Jun  7 05:09:41 2014
New Revision: 267207
URL: http://svnweb.freebsd.org/changeset/base/267207

Log:
  Mark the PMU extint-gpio as an early driver, for suspend/resume purposes.
  Also add the suspend/resume EVENTHANDLER invocations.

Modified:
  projects/pmac_pmu/sys/powerpc/powermac/pmu.c

Modified: projects/pmac_pmu/sys/powerpc/powermac/pmu.c
==============================================================================
--- projects/pmac_pmu/sys/powerpc/powermac/pmu.c	Sat Jun  7 05:07:52 2014	(r267206)
+++ projects/pmac_pmu/sys/powerpc/powermac/pmu.c	Sat Jun  7 05:09:41 2014	(r267207)
@@ -175,7 +175,7 @@ static driver_t pmuextint_driver = {
 
 static devclass_t pmuextint_devclass;
 
-DRIVER_MODULE(pmuextint, macgpio, pmuextint_driver, pmuextint_devclass, 0, 0);
+EARLY_DRIVER_MODULE(pmuextint, macgpio, pmuextint_driver, pmuextint_devclass, 0, 0, BUS_PASS_RESOURCE);
 
 /* Make sure uhid is loaded, as it turns off some of the ADB emulation */
 MODULE_DEPEND(pmu, usb, 1, 1, 1);
@@ -1145,6 +1145,7 @@ pmu_sleep(SYSCTL_HANDLER_ARGS)
 	if (error || !req->newptr)
 		return (error);
 
+	EVENTHANDLER_INVOKE(power_suspend);
 	mtx_lock(&Giant);
 	error = DEVICE_SUSPEND(root_bus);
 	if (error == 0) {
@@ -1155,6 +1156,7 @@ pmu_sleep(SYSCTL_HANDLER_ARGS)
 		DEVICE_RESUME(root_bus);
 	}
 	mtx_unlock(&Giant);
+	EVENTHANDLER_INVOKE(power_resume);
 	printf("Fully resumed.\n");
 
 	return (error);


More information about the svn-src-projects mailing list