I'm trying to simplify ACPI drivers by reducing their dependence on internal ACPI CA details. One possibility seems to be moving notify handler management from individual drivers into the Linux/ACPI driver registration code. These patches add support for an ACPI driver .notify() method. If one is present, the Linux/ACPI code installs a generic notify handler when the driver binds to a device. The generic handler passes the event on to the driver's .notify() method. The advantage is that the driver need not install or remove the notify handler, and the .notify() method works in terms of a struct acpi_device rather than an acpi_handle. Note that these patches only affect device notifications, not system notifications. System notifications are primarily bus-related events for things like hot-plug and wakeup. The device notifications are generally driver-specific things like "device status changed," "button pressed," or "some method needs to be re-evaluated." Comments welcome. Bjorn --- Bjorn Helgaas (10): ACPI: WMI: use .notify method instead of installing handler directly sony-laptop: use .notify method instead of installing handler directly panasonic-laptop: use .notify method instead of installing handler directly fujitsu-laptop: use .notify method instead of installing hotkey handler directly fujitsu-laptop: use .notify method instead of installing handler directly ACPI: video: use .notify method instead of installing handler directly ACPI: thermal: use .notify method instead of installing handler directly ACPI: processor: use .notify method instead of installing handler directly ACPI: button: use .notify method instead of installing handler directly ACPI: support acpi_device_ops .notify methods drivers/acpi/button.c | 77 +++---------------------------- drivers/acpi/processor_core.c | 19 ++------ drivers/acpi/scan.c | 71 +++++++++++++++++++++++++++++ drivers/acpi/thermal.c | 27 ++--------- drivers/acpi/video.c | 30 ++---------- drivers/platform/x86/fujitsu-laptop.c | 60 ++++-------------------- drivers/platform/x86/panasonic-laptop.c | 26 ++-------- drivers/platform/x86/sony-laptop.c | 32 ++----------- drivers/platform/x86/wmi.c | 15 +----- include/acpi/acpi_bus.h | 2 + include/acpi/acpi_drivers.h | 10 ++++ 11 files changed, 126 insertions(+), 243 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html