Dan Williams | 51cf784 | 2017-07-12 17:58:21 -0700 | [diff] [blame] | 1 | // 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__ |
| 5 | struct device; |
| 6 | struct dev_dax; |
| 7 | struct resource; |
| 8 | struct dax_device; |
| 9 | struct dax_region; |
| 10 | void dax_region_put(struct dax_region *dax_region); |
| 11 | struct dax_region *alloc_dax_region(struct device *parent, int region_id, |
| 12 | struct resource *res, unsigned int align, unsigned long flags); |
| 13 | struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id); |
Dan Williams | 9567da0 | 2017-07-12 17:58:21 -0700 | [diff] [blame^] | 14 | int __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 Williams | 51cf784 | 2017-07-12 17:58:21 -0700 | [diff] [blame] | 18 | void kill_dev_dax(struct dev_dax *dev_dax); |
Dan Williams | 9567da0 | 2017-07-12 17:58:21 -0700 | [diff] [blame^] | 19 | |
| 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 | */ |
| 25 | void 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 Williams | 51cf784 | 2017-07-12 17:58:21 -0700 | [diff] [blame] | 31 | #endif /* __DAX_BUS_H__ */ |