Date: Sat, 7 Jun 2014 05:09:42 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r267207 - projects/pmac_pmu/sys/powerpc/powermac Message-ID: <201406070509.s5759g59090876@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406070509.s5759g59090876>