drivers/w1/w1_netlink.h
Source file repositories/reference/linux-study-clean/drivers/w1/w1_netlink.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/w1/w1_netlink.h- Extension
.h- Size
- 3625 bytes
- Lines
- 136
- Domain
- Driver Families
- Bucket
- drivers/w1
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/types.hlinux/connector.hw1_internal.h
Detected Declarations
struct w1_netlink_msgstruct w1_mststruct w1_netlink_cmdenum w1_cn_msg_flagsenum w1_netlink_message_typesenum w1_commands
Annotated Snippet
struct w1_mst {
__u32 id;
__u32 res;
} mst;
} id;
__u8 data[];
};
/**
* enum w1_commands - commands available for master or slave operations
*
* @W1_CMD_READ: read len bytes
* @W1_CMD_WRITE: write len bytes
* @W1_CMD_SEARCH: initiate a standard search, returns only the slave
* devices found during that search
* @W1_CMD_ALARM_SEARCH: search for devices that are currently alarming
* @W1_CMD_TOUCH: Touches a series of bytes.
* @W1_CMD_RESET: sends a bus reset on the given master
* @W1_CMD_SLAVE_ADD: adds a slave to the given master,
* 8 byte slave id at data[0]
* @W1_CMD_SLAVE_REMOVE: removes a slave to the given master,
* 8 byte slave id at data[0]
* @W1_CMD_LIST_SLAVES: list of slaves registered on this master
* @W1_CMD_MAX: number of available commands
*/
enum w1_commands {
W1_CMD_READ = 0,
W1_CMD_WRITE,
W1_CMD_SEARCH,
W1_CMD_ALARM_SEARCH,
W1_CMD_TOUCH,
W1_CMD_RESET,
W1_CMD_SLAVE_ADD,
W1_CMD_SLAVE_REMOVE,
W1_CMD_LIST_SLAVES,
W1_CMD_MAX
};
/**
* struct w1_netlink_cmd - holds the command and data
*
* @cmd: one of enum w1_commands
* @res: reserved
* @len: length of data following w1_netlink_cmd
* @data: start address of any following data
*
* One or more struct w1_netlink_cmd is placed starting at w1_netlink_msg.data
* each with optional data.
*/
struct w1_netlink_cmd
{
__u8 cmd;
__u8 res;
__u16 len;
__u8 data[];
};
#ifdef __KERNEL__
void w1_netlink_send(struct w1_master *, struct w1_netlink_msg *);
int w1_init_netlink(void);
void w1_fini_netlink(void);
#endif /* __KERNEL__ */
#endif /* __W1_NETLINK_H */
Annotation
- Immediate include surface: `asm/types.h`, `linux/connector.h`, `w1_internal.h`.
- Detected declarations: `struct w1_netlink_msg`, `struct w1_mst`, `struct w1_netlink_cmd`, `enum w1_cn_msg_flags`, `enum w1_netlink_message_types`, `enum w1_commands`.
- Atlas domain: Driver Families / drivers/w1.
- Implementation status: source 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.