ENUM STRUCT_DEVICE_FLAGS(9)
π NAME π
enum struct_device_flags β that's the enum, bestie, and this page is from the Kernel API Manual. It's all about the flags living inside struct device, no cap π«Ά
π SYNOPSIS π
enum struct_device_flags {
DEV_FLAG_READY_TO_PROBE ,
DEV_FLAG_CAN_MATCH ,
DEV_FLAG_DMA_IOMMU ,
DEV_FLAG_DMA_SKIP_SYNC ,
DEV_FLAG_DMA_OPS_BYPASS ,
DEV_FLAG_STATE_SYNCED ,
DEV_FLAG_DMA_COHERENT ,
DEV_FLAG_OF_NODE_REUSED ,
DEV_FLAG_OFFLINE_DISABLED ,
DEV_FLAG_OFFLINE ,
DEV_FLAG_COUNT
};
β¨ Constants β¨
Okay so here's the whole flag lineup, and yes, every single one is iconic in its own way π
DEV_FLAG_READY_TO_PROBEβ if this one's set, thendevice_addhas finished enough initialization thatprobecould be called. It's giving "ready, set, probe" energy β¨DEV_FLAG_CAN_MATCHβ the device has matched with a driver at least once, or it's in a bus (like AMBA) which can't check for matching drivers until other devices probe successfully. Lowkey a matchmaker flag πDEV_FLAG_DMA_IOMMUβ the device is using the default IOMMU implementation for DMA and doesn't rely on thedma_opsstructure. Very "I got my own setup, thanks" πDEV_FLAG_DMA_SKIP_SYNCβ DMA sync operations can be skipped for coherent buffers. Skipping the sync, not the vibes π¦DEV_FLAG_DMA_OPS_BYPASSβ if set, then thedma_opsare bypassed for the streaming DMA operations (->map_*/->unmap_*/->sync_*), and optional (if the coherent mask is large enough) also for dma allocations. This flag is managed by the dma ops instance from->dma_supported. Big main-character energy for the bypass π€DEV_FLAG_STATE_SYNCEDβ the hardware state of this device has been synced to match the software state of this device by calling the driver/bussync_statecallback. Synced and slaying π«DEV_FLAG_DMA_COHERENTβ this particular device is dma coherent, even if the architecture supports non-coherent devices. It's special like that πDEV_FLAG_OF_NODE_REUSEDβ set if the device-tree node is shared with an ancestor device. Family tree but make it kernel π³DEV_FLAG_OFFLINE_DISABLEDβ if set, the device is permanently online. Never offline, not even for a vibe check π₯DEV_FLAG_OFFLINEβ set after successful invocation of bus type's.offline. Bye bestie, you're offline now πDEV_FLAG_COUNTβ number of definedstruct_device_flags. The final boss of the enum count π
π« Description π«
Each flag should have a set of accessor functions created via __create_dev_flag_accessors for each access. Like, every flag gets its accessor treatment, okay? Periodt π
π₯ SEE ALSO π₯
Kernel file ./include/linux/device.h is the home base, and here's the whole squad of references:
struct subsys_interface(9)struct device_attribute(9)struct dev_ext_attribute(9)DEVICE_ATTR(9)DEVICE_ATTR_RW(9)DEVICE_ATTR_ADMIN_RW(9)DEVICE_ATTR_RW_NAMED(9)DEVICE_ATTR_RO(9)DEVICE_ATTR_ADMIN_RO(9)DEVICE_ATTR_RO_NAMED(9)DEVICE_ATTR_WO(9)DEVICE_ATTR_WO_NAMED(9)DEVICE_ULONG_ATTR(9)DEVICE_INT_ATTR(9)DEVICE_BOOL_ATTR(9)DEVICE_STRING_ATTR_RO(9)enum device_link_state(9)enum dl_dev_state(9)enum device_removable(9)struct dev_links_info(9)struct dev_msi_info(9)enum device_physical_location_panel(9)enum device_physical_location_vertical_position(9)enum device_physical_location_horizontal_position(9)struct device_physical_location(9)struct device(9)struct device_link(9)device_set_driver_override(9)device_has_driver_override(9)device_match_driver_override(9)device_iommu_mapped(9)dev_name(9)dev_bus_name(9)device_find_child_by_name(9)device_find_any_child(9)device_lock_set_class(9)device_lock_reset_class(9)
Source/version check: this page is from./include/linux, dated October 2026, and its manual name isenum struct_device_flags(9). Now go forth and flag responsibly, bestie π β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms