From owner-svn-src-projects@FreeBSD.ORG Sat Jun 7 05:09:42 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84CAA5D8; Sat, 7 Jun 2014 05:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 723862AE0; Sat, 7 Jun 2014 05:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5759gwL090877; Sat, 7 Jun 2014 05:09:42 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5759g59090876; Sat, 7 Jun 2014 05:09:42 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201406070509.s5759g59090876@svn.freebsd.org> From: Justin Hibbits Date: Sat, 7 Jun 2014 05:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r267207 - projects/pmac_pmu/sys/powerpc/powermac X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 05:09:42 -0000 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);