drivers/dax/bus.h

Source file repositories/reference/linux-study-clean/drivers/dax/bus.h

File Facts

System
Linux kernel
Corpus path
drivers/dax/bus.h
Extension
.h
Size
2092 bytes
Lines
80
Domain
Driver Families
Bucket
drivers/dax
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct device_driver drv;
	struct list_head ids;
	enum dax_driver_type type;
	int (*probe)(struct dev_dax *dev);
	void (*remove)(struct dev_dax *dev);
};

#define to_dax_drv(__drv) container_of_const(__drv, struct dax_device_driver, drv)

int __dax_driver_register(struct dax_device_driver *dax_drv,
		struct module *module, const char *mod_name);
#define dax_driver_register(driver) \
	__dax_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
void dax_driver_unregister(struct dax_device_driver *dax_drv);
void kill_dev_dax(struct dev_dax *dev_dax);
bool static_dev_dax(struct dev_dax *dev_dax);

struct hmem_platform_device {
	struct platform_device pdev;
	struct work_struct work;
	bool did_probe;
};

static inline struct hmem_platform_device *
to_hmem_platform_device(struct platform_device *pdev)
{
	return container_of(pdev, struct hmem_platform_device, pdev);
}

#if IS_ENABLED(CONFIG_DEV_DAX_HMEM)
void dax_hmem_flush_work(void);
#else
static inline void dax_hmem_flush_work(void) { }
#endif

#define MODULE_ALIAS_DAX_DEVICE(type) \
	MODULE_ALIAS("dax:t" __stringify(type) "*")
#define DAX_DEVICE_MODALIAS_FMT "dax:t%d"

#endif /* __DAX_BUS_H__ */

Annotation

Implementation Notes