summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_button.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-07-21 04:05:08 +0000
committermsmith <msmith@FreeBSD.org>2001-07-21 04:05:08 +0000
commit463a32bf0dc7d8704b16f256d69cccad6a91e140 (patch)
tree2cea732a5b6371889a38c1c31ed62634d8d28110 /sys/dev/acpica/acpi_button.c
parentfdc534151a6e846ad0d22cde61a680cc4a7d5b09 (diff)
downloadFreeBSD-src-463a32bf0dc7d8704b16f256d69cccad6a91e140.zip
FreeBSD-src-463a32bf0dc7d8704b16f256d69cccad6a91e140.tar.gz
Don't call ourselves a "control method" anything, that's not useful.
Move the "button pressed" diagnostics to the point where we can print out which button was actually pressed.
Diffstat (limited to 'sys/dev/acpica/acpi_button.c')
-rw-r--r--sys/dev/acpica/acpi_button.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c
index c69d7e0..c00441e 100644
--- a/sys/dev/acpica/acpi_button.c
+++ b/sys/dev/acpica/acpi_button.c
@@ -83,12 +83,12 @@ acpi_button_probe(device_t dev)
if (acpi_get_type(dev) == ACPI_TYPE_DEVICE) {
if (!acpi_disabled("button")) {
if (acpi_MatchHid(dev, "PNP0C0C")) {
- device_set_desc(dev, "Control Method Power Button Device");
+ device_set_desc(dev, "Power Button");
sc->button_type = ACPI_POWER_BUTTON;
return(0);
}
if (acpi_MatchHid(dev, "PNP0C0E")) {
- device_set_desc(dev, "Control Method Sleep Button Device");
+ device_set_desc(dev, "Sleep Button");
sc->button_type = ACPI_SLEEP_BUTTON;
return(0);
}
@@ -133,9 +133,11 @@ acpi_button_notify_pressed_for_sleep(void *arg)
switch (sc->button_type) {
case ACPI_POWER_BUTTON:
+ device_printf(sc->button_dev, "power button pressed\n", sc->button_type);
acpi_eventhandler_power_button_for_sleep((void *)acpi_sc);
break;
case ACPI_SLEEP_BUTTON:
+ device_printf(sc->button_dev, "sleep button pressed\n", sc->button_type);
acpi_eventhandler_sleep_button_for_sleep((void *)acpi_sc);
break;
default:
@@ -160,9 +162,11 @@ acpi_button_notify_pressed_for_wakeup(void *arg)
switch (sc->button_type) {
case ACPI_POWER_BUTTON:
+ device_printf(sc->button_dev, "wakeup by power button\n", sc->button_type);
acpi_eventhandler_power_button_for_wakeup((void *)acpi_sc);
break;
case ACPI_SLEEP_BUTTON:
+ device_printf(sc->button_dev, "wakeup by sleep button\n", sc->button_type);
acpi_eventhandler_sleep_button_for_wakeup((void *)acpi_sc);
break;
default:
@@ -185,11 +189,9 @@ acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
switch (notify) {
case ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP:
AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_button_notify_pressed_for_sleep, sc);
- device_printf(sc->button_dev, "pressed for sleep, button type: %d\n", sc->button_type);
break;
case ACPI_NOTIFY_BUTTON_PRESSED_FOR_WAKEUP:
AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_button_notify_pressed_for_wakeup, sc);
- device_printf(sc->button_dev, "pressed for wakeup, button type: %d\n", sc->button_type);
break;
default:
break; /* unknown notification value */
OpenPOWER on IntegriCloud