]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/libnvdimm.h
libnvdimm, nfit: initial libnvdimm infrastructure and NFIT support
[mirror_ubuntu-bionic-kernel.git] / include / linux / libnvdimm.h
1 /*
2 * libnvdimm - Non-volatile-memory Devices Subsystem
3 *
4 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15 #ifndef __LIBNVDIMM_H__
16 #define __LIBNVDIMM_H__
17 struct nvdimm;
18 struct nvdimm_bus_descriptor;
19 typedef int (*ndctl_fn)(struct nvdimm_bus_descriptor *nd_desc,
20 struct nvdimm *nvdimm, unsigned int cmd, void *buf,
21 unsigned int buf_len);
22
23 struct nvdimm_bus_descriptor {
24 unsigned long dsm_mask;
25 char *provider_name;
26 ndctl_fn ndctl;
27 };
28
29 struct device;
30 struct nvdimm_bus;
31 struct nvdimm_bus *nvdimm_bus_register(struct device *parent,
32 struct nvdimm_bus_descriptor *nfit_desc);
33 void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus);
34 #endif /* __LIBNVDIMM_H__ */