summaryrefslogtreecommitdiff
path: root/include/linux/nd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nd.h')
-rw-r--r--include/linux/nd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/nd.h b/include/linux/nd.h
index d8f5023b49ae..96069c543890 100644
--- a/include/linux/nd.h
+++ b/include/linux/nd.h
@@ -21,6 +21,14 @@ enum nvdimm_event {
NVDIMM_REVALIDATE_POISON,
};
+enum nvdimm_claim_class {
+ NVDIMM_CCLASS_NONE,
+ NVDIMM_CCLASS_BTT,
+ NVDIMM_CCLASS_PFN,
+ NVDIMM_CCLASS_DAX,
+ NVDIMM_CCLASS_UNKNOWN,
+};
+
struct nd_device_driver {
struct device_driver drv;
unsigned long type;
@@ -41,12 +49,14 @@ static inline struct nd_device_driver *to_nd_device_driver(
* @force_raw: ignore other personalities for the namespace (e.g. btt)
* @dev: device model node
* @claim: when set a another personality has taken ownership of the namespace
+ * @claim_class: restrict claim type to a given class
* @rw_bytes: access the raw namespace capacity with byte-aligned transfers
*/
struct nd_namespace_common {
int force_raw;
struct device dev;
struct device *claim;
+ enum nvdimm_claim_class claim_class;
int (*rw_bytes)(struct nd_namespace_common *, resource_size_t offset,
void *buf, size_t size, int rw, unsigned long flags);
};