Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146322647
D48735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48735.diff
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -3634,6 +3634,7 @@
device_printf(sc->acpi_dev, "device_suspend failed\n");
goto backout;
}
+ EVENTHANDLER_INVOKE(acpi_post_dev_suspend, stype);
slp_state |= ACPI_SS_DEV_SUSPEND;
if (stype != POWER_STYPE_SUSPEND_TO_IDLE) {
@@ -3683,6 +3684,7 @@
slp_state &= ~ACPI_SS_GPE_SET;
}
if ((slp_state & ACPI_SS_DEV_SUSPEND) != 0) {
+ EVENTHANDLER_INVOKE(acpi_pre_dev_resume, stype);
DEVICE_RESUME(root_bus);
slp_state &= ~ACPI_SS_DEV_SUSPEND;
}
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -482,12 +482,14 @@
#define ACPI_EVENT_PRI_DEFAULT 10000
#define ACPI_EVENT_PRI_LAST 20000
-typedef void (*acpi_event_handler_t)(void *, int);
+typedef void (*acpi_event_handler_t)(void *, enum power_stype);
EVENTHANDLER_DECLARE(acpi_sleep_event, acpi_event_handler_t);
EVENTHANDLER_DECLARE(acpi_wakeup_event, acpi_event_handler_t);
EVENTHANDLER_DECLARE(acpi_acad_event, acpi_event_handler_t);
EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t);
+EVENTHANDLER_DECLARE(acpi_post_dev_suspend, acpi_event_handler_t);
+EVENTHANDLER_DECLARE(acpi_pre_dev_resume, acpi_event_handler_t);
/* Device power control. */
ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 2, 6:01 PM (1 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29166079
Default Alt Text
D48735.diff (1 KB)
Attached To
Mode
D48735: acpi: Call SPMC suspend/resume hooks
Attached
Detach File
Event Timeline
Log In to Comment