summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/nd-core.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-04-25 03:56:17 -0400
committerDan Williams <dan.j.williams@intel.com>2015-06-24 21:24:10 -0400
commite6dfb2de47768efe8cc37c9a1863d2aff81440fb (patch)
treea1ad89328d88a37195f23ca9421071fc29e6722f /drivers/nvdimm/nd-core.h
parent45def22c1fab85764646746ce38d45b2f3281fa5 (diff)
libnvdimm, nfit: dimm/memory-devices
Enable nvdimm devices to be registered on a nvdimm_bus. The kernel assigned device id for nvdimm devicesis dynamic. If userspace needs a more static identifier it should consult a provider-specific attribute. In the case where NFIT is the provider, the 'nmemX/nfit/handle' or 'nmemX/nfit/serial' attributes may be used for this purpose. Cc: Neil Brown <neilb@suse.de> Cc: <linux-acpi@vger.kernel.org> Cc: Greg KH <gregkh@linuxfoundation.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>
Diffstat (limited to 'drivers/nvdimm/nd-core.h')
-rw-r--r--drivers/nvdimm/nd-core.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index 0b0ff2423161..9b8303413b60 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -15,6 +15,10 @@
#include <linux/libnvdimm.h>
#include <linux/device.h>
+extern struct list_head nvdimm_bus_list;
+extern struct mutex nvdimm_bus_list_mutex;
+extern struct bus_type nvdimm_bus_type;
+
struct nvdimm_bus {
struct nvdimm_bus_descriptor *nd_desc;
struct list_head list;
@@ -22,6 +26,14 @@ struct nvdimm_bus {
int id;
};
+struct nvdimm {
+ unsigned long flags;
+ void *provider_data;
+ struct device dev;
+ int id;
+};
+
+struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev);
int __init nvdimm_bus_init(void);
void __exit nvdimm_bus_exit(void);
int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus);