include/linux/of_device.h
Source file repositories/reference/linux-study-clean/include/linux/of_device.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/of_device.h- Extension
.h- Size
- 2280 bytes
- Lines
- 91
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/driver.h
Detected Declarations
struct devicestruct of_device_idstruct kobj_uevent_envfunction of_driver_match_devicefunction of_dma_configurefunction of_driver_match_devicefunction of_device_ueventfunction of_device_uevent_modaliasfunction of_dma_configure_idfunction of_dma_configurefunction of_device_make_bus_id
Annotated Snippet
const struct device_driver *drv)
{
return of_match_device(drv->of_match_table, dev) != NULL;
}
extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len);
extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env);
extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env);
int of_dma_configure_id(struct device *dev,
struct device_node *np,
bool force_dma, const u32 *id);
static inline int of_dma_configure(struct device *dev,
struct device_node *np,
bool force_dma)
{
return of_dma_configure_id(dev, np, force_dma, NULL);
}
void of_device_make_bus_id(struct device *dev);
#else /* CONFIG_OF */
static inline int of_driver_match_device(struct device *dev,
const struct device_driver *drv)
{
return 0;
}
static inline void of_device_uevent(const struct device *dev,
struct kobj_uevent_env *env) { }
static inline int of_device_modalias(struct device *dev,
char *str, ssize_t len)
{
return -ENODEV;
}
static inline int of_device_uevent_modalias(const struct device *dev,
struct kobj_uevent_env *env)
{
return -ENODEV;
}
static inline const struct of_device_id *of_match_device(
const struct of_device_id *matches, const struct device *dev)
{
return NULL;
}
static inline int of_dma_configure_id(struct device *dev,
struct device_node *np,
bool force_dma,
const u32 *id)
{
return 0;
}
static inline int of_dma_configure(struct device *dev,
struct device_node *np,
bool force_dma)
{
return 0;
}
static inline void of_device_make_bus_id(struct device *dev) {}
#endif /* CONFIG_OF */
#endif /* _LINUX_OF_DEVICE_H */
Annotation
- Immediate include surface: `linux/device/driver.h`.
- Detected declarations: `struct device`, `struct of_device_id`, `struct kobj_uevent_env`, `function of_driver_match_device`, `function of_dma_configure`, `function of_driver_match_device`, `function of_device_uevent`, `function of_device_uevent_modalias`, `function of_dma_configure_id`, `function of_dma_configure`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.