]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libnvdimm: control character device and nvdimm_bus sysfs attributes
authorDan Williams <dan.j.williams@intel.com>
Sun, 26 Apr 2015 23:26:48 +0000 (19:26 -0400)
committerDan Duval <dan.duval@oracle.com>
Tue, 11 Oct 2016 18:25:04 +0000 (14:25 -0400)
commit9d8789f66a90a9b83d8094cad4318c77d49d5923
tree99856016ad124197a2e79814e77df58a43455bd6
parent3d587ff696f664b6b734a85eba77562732dbdeec
libnvdimm: control character device and nvdimm_bus sysfs attributes

Orabug: 22913653

The control device for a nvdimm_bus is registered as an "nd" class
device.  The expectation is that there will usually only be one "nd" bus
registered under /sys/class/nd.  However, we allow for the possibility
of multiple buses and they will listed in discovery order as
ndctl0...ndctlN.  This character device hosts the ioctl for passing
control messages.  The initial command set has a 1:1 correlation with
the commands listed in the by the "NFIT DSM Example" document [1], but
this scheme is extensible to future command sets.

Note, nd_ioctl() and the backing ->ndctl() implementation are defined in
a subsequent patch.  This is simply the initial registrations and sysfs
attributes.

[1]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf

Cc: Neil Brown <neilb@suse.de>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-acpi@vger.kernel.org>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 45def22c1fab85764646746ce38d45b2f3281fa5)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/nfit.c
drivers/acpi/nfit.h
drivers/nvdimm/Makefile
drivers/nvdimm/bus.c [new file with mode: 0644]
drivers/nvdimm/core.c
drivers/nvdimm/nd-core.h
include/linux/libnvdimm.h