History log of /haiku/src/servers/power/power_button_monitor.cpp
Revision Date Author Comments
# bf29cdd7 24-Aug-2014 Rene Gollent <rene@gollent.com>

power_daemon: Refactor to handle multiple exported power devices.

- Each PowerMonitor now exports a set of descriptors rather than
only a single one. This allows e.g. PowerButtonMonitor to watch
multiple possible button event sources rather than one.

This gets power button working again on some hardware that exports
multiple ACPI power buttons, but offers no obvious way to determine
which one is actually active/being used. In the long term though, it'd
be nice to have a well-defined kernel power event interface that an app
could subscribe to, rather than having to watch individual devfs
descriptors.

Thanks to tqh and korli for advice/review.


# c9db30cd 13-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

power_daemon: use wait_for_objects() instead of polling.

* acpi_button and acpi_lid support select/deselect hooks.
* power_daemon now uses a thread waiting for lid or power button events.
* a power button event is still hardcoded to a shutdown.
* a lid event only displays a message.


# 28fd5537 13-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

power_daemon: code cleanup, added copyright header.


# 0fa0204f 28-Oct-2011 François Revol <revol@free.fr>

Use the new private roster API to shutdown.
Maybe we should have a confirmation alert the first time ?
Btw, the power_button driver should really implement select() or some other non-polling mechanism, it sux having to waste cpu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d86d43eb 23-Feb-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Added the beginnings of our power management daemon. Currently does nothing except tell the roster to shut down when you press the power button (in conjuction with acpi_button, of course). Eventually will do things like display low power warnings, spin down hard disks, and display the requisite power info deskbar replicant.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf29cdd77788f6761ca85f6039abec2589c45194 24-Aug-2014 Rene Gollent <rene@gollent.com>

power_daemon: Refactor to handle multiple exported power devices.

- Each PowerMonitor now exports a set of descriptors rather than
only a single one. This allows e.g. PowerButtonMonitor to watch
multiple possible button event sources rather than one.

This gets power button working again on some hardware that exports
multiple ACPI power buttons, but offers no obvious way to determine
which one is actually active/being used. In the long term though, it'd
be nice to have a well-defined kernel power event interface that an app
could subscribe to, rather than having to watch individual devfs
descriptors.

Thanks to tqh and korli for advice/review.


# c9db30cd7f922e7a828f55c2f234d21e6bfa585a 13-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

power_daemon: use wait_for_objects() instead of polling.

* acpi_button and acpi_lid support select/deselect hooks.
* power_daemon now uses a thread waiting for lid or power button events.
* a power button event is still hardcoded to a shutdown.
* a lid event only displays a message.


# 28fd553722599b20aed5fdf2d704b6a30ea126c9 13-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

power_daemon: code cleanup, added copyright header.


# 0fa0204f7cfa96ec117a006bd308e52a148b4bbd 28-Oct-2011 François Revol <revol@free.fr>

Use the new private roster API to shutdown.
Maybe we should have a confirmation alert the first time ?
Btw, the power_button driver should really implement select() or some other non-polling mechanism, it sux having to waste cpu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42934 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d86d43eba20a4401f775d37df1d4fe605131a0bb 23-Feb-2005 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Added the beginnings of our power management daemon. Currently does nothing except tell the roster to shut down when you press the power button (in conjuction with acpi_button, of course). Eventually will do things like display low power warnings, spin down hard disks, and display the requisite power info deskbar replicant.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11466 a95241bf-73f2-0310-859d-f6bbb57e9c96