STRUCT W1_MASTER(9)
π struct w1_master(9) π
okay so welcome to the Kernel API Manual, bestie β this entry is all about struct w1_master, and the whole vibe is literally one per bus master. no cap.
πΈ NAME πΈ
struct w1_master β one per bus master. that's it, that's the energy. icon.
β¨ SYNOPSIS β¨
here's the full struct, no skipping, no summarizing, we respect the whole thing:
struct w1_master {
struct list_head w1_master_entry;
struct module *owner;
unsigned char name[W1_MAXNAMELEN];
struct mutex list_mutex;
struct list_head slist;
struct list_head async_list;
int max_slave_count, slave_count;
unsigned long attempts;
int slave_ttl;
int initialized;
u32 id;
int search_count;
u64 search_id;
atomic_t refcnt;
void *priv;
int enable_pullup;
int pullup_duration;
long flags;
struct task_struct *thread;
struct mutex mutex;
struct mutex bus_mutex;
struct device_driver *driver;
struct device dev;
struct w1_bus_master *bus_master;
u32 seq;
};
π§ Members π§
okay so every member, one by one, because we do not leave the group chat on read:
w1_master_entryβ the master linked list. it's giving linked-list energy.ownerβ the module owner.nameβ a dynamically allocated bus name.list_mutexβ protectsslistandasync_list.slistβ the linked list of slaves.async_listβ the linked list of netlink commands to execute.max_slave_countβ the maximum number of slaves to search for at a time.slave_countβ the current number of slaves known.attemptsβ the number of searches run.slave_ttlβ the number of searches before a slave is timed out.initializedβ prevents init/removal race conditions.idβ the w1 bus number.search_countβ the number of automatic searches to run;-1means unlimited.search_idβ allows continuing a search.refcntβ the reference count.privβ private data storage.enable_pullupβ allows a strong pullup.pullup_durationβ the time for the next strong pullup.flagsβ one ofw1_master_flags.threadβ the thread for bus search and netlink commands.mutexβ protects most ofw1_master.bus_mutexβ protects concurrent bus access (the page sayspretect, iconic typo, same meaning tho).driverβ the sysfs driver.devβ the sysfs device.bus_masterβ the I/O operations available.seqβ the sequence number used for netlink broadcasts.
π« SEE ALSO π«
go look at these too, bestie β the kernel file is ./include/linux/w1.h, and the whole friend group is:
struct w1_reg_num(9)struct w1_slave(9)struct w1_bus_master(9)enum w1_master_flags(9)struct w1_family_ops(9)struct w1_family(9)module_w1_family(9)
xoxo, source/version ./include/linux, dated October 2026 β byeee bestie, slay responsibly π
π
π¦ 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