blob: ea509504df3aadd8b4ede7cde31e9719383e94ba [file] [log] [blame]
Dan Williams51cf7842017-07-12 17:58:21 -07001// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2016 - 2018 Intel Corporation. All rights reserved. */
3#ifndef __DAX_BUS_H__
4#define __DAX_BUS_H__
5struct device;
6struct dev_dax;
7struct resource;
8struct dax_device;
9struct dax_region;
10void dax_region_put(struct dax_region *dax_region);
11struct dax_region *alloc_dax_region(struct device *parent, int region_id,
12 struct resource *res, unsigned int align, unsigned long flags);
13struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id);
Dan Williams9567da02017-07-12 17:58:21 -070014int __dax_driver_register(struct device_driver *drv,
15 struct module *module, const char *mod_name);
16#define dax_driver_register(driver) \
17 __dax_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
Dan Williams51cf7842017-07-12 17:58:21 -070018void kill_dev_dax(struct dev_dax *dev_dax);
Dan Williams9567da02017-07-12 17:58:21 -070019
20/*
21 * While run_dax() is potentially a generic operation that could be
22 * defined in include/linux/dax.h we don't want to grow any users
23 * outside of drivers/dax/
24 */
25void run_dax(struct dax_device *dax_dev);
26
27#define MODULE_ALIAS_DAX_DEVICE(type) \
28 MODULE_ALIAS("dax:t" __stringify(type) "*")
29#define DAX_DEVICE_MODALIAS_FMT "dax:t%d"
30
Dan Williams51cf7842017-07-12 17:58:21 -070031#endif /* __DAX_BUS_H__ */