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.
- 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/platform_device.hlinux/range.hlinux/workqueue.h
Detected Declarations
struct dev_daxstruct resourcestruct dax_devicestruct dax_regionstruct dev_dax_datastruct dax_device_driverstruct hmem_platform_deviceenum dax_driver_typefunction to_hmem_platform_devicefunction dax_hmem_flush_work
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
- Immediate include surface: `linux/device.h`, `linux/platform_device.h`, `linux/range.h`, `linux/workqueue.h`.
- Detected declarations: `struct dev_dax`, `struct resource`, `struct dax_device`, `struct dax_region`, `struct dev_dax_data`, `struct dax_device_driver`, `struct hmem_platform_device`, `enum dax_driver_type`, `function to_hmem_platform_device`, `function dax_hmem_flush_work`.
- Atlas domain: Driver Families / drivers/dax.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.