mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Tested-by: Toshi Kani <[email protected]> Reviewed-by: Vishal Verma <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Toshi Kani <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
c14a868a5a
commit
ba9c8dd3c2
4 changed files with 103 additions and 4 deletions
|
|
@ -263,6 +263,12 @@ const char *nvdimm_name(struct nvdimm *nvdimm)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(nvdimm_name);
|
||||
|
||||
struct kobject *nvdimm_kobj(struct nvdimm *nvdimm)
|
||||
{
|
||||
return &nvdimm->dev.kobj;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvdimm_kobj);
|
||||
|
||||
unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm)
|
||||
{
|
||||
return nvdimm->cmd_mask;
|
||||
|
|
|
|||
Loading…
Reference in a new issue