acpi, nfit: add dimm device notification support
authorDan Williams <dan.j.williams@intel.com>
Tue, 23 Aug 2016 02:28:37 +0000 (19:28 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 29 Aug 2016 21:55:17 +0000 (14:55 -0700)
commitba9c8dd3c22275e46feef429f343b85e9cf3924c
tree0d15030ac3ac20a2dd9c700f988f575686f0f81b
parentc14a868a5a14f385059f012e54291de95a538a02
acpi, nfit: add dimm device notification support

Per "ACPI 6.1 Section 9.20.3" NVDIMM devices, children of the ACPI0012
NVDIMM Root device, can receive health event notifications.

Given that these devices are precluded from registering a notification
handler via acpi_driver.acpi_device_ops (due to no _HID), we use
acpi_install_notify_handler() directly.  The registered handler,
acpi_nvdimm_notify(), triggers a poll(2) event on the nmemX/nfit/flags
sysfs attribute when a health event notification is received.

Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Toshi Kani <toshi.kani@hpe.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c
drivers/acpi/nfit/nfit.h
drivers/nvdimm/dimm_devs.c
include/linux/libnvdimm.h