w1_therm_add_slave(9)
π w1_therm_add_slave(9) β Kernel API Manual, bestie π
Okay so this is w1_therm_add_slave(9) from the Kernel API Manual, and it's lowkey iconic for a tiny little callback. Let's get into it β¨
πΈ NAME πΈ
w1_therm_add_slave β called when a new slave is discovered. Slay. π
β¨ SYNOPSIS β¨
int w1_therm_add_slave (struct w1_slave *sl );
π ARGUMENTS π
slβ the slave that was just discovered by the master. That's the whole vibe check right there π«Ά
π¦ DESCRIPTION π¦
Bestie, picture this: the master discovers a new slave on the bus, and this function gets called. Its whole job is to initialize the slave's state before any communication even starts. No cap, that's it β but it's important π
π₯ RETURN π₯
Returns 0 if it's a success, and a negative kernel code otherwise. So 0 is the good ending, negative is the "oop" ending π
π SEE ALSO π
The whole squad, fr fr:
- Kernel file
./drivers/w1/slaves/w1_therm.c struct w1_therm_family_converter(9)struct w1_therm_family_data(9)struct therm_info(9)reset_select_slave(9)convert_t(9)read_scratchpad(9)write_scratchpad(9)copy_scratchpad(9)recall_eeprom(9)read_powermode(9)trigger_bulk_read(9)w1_therm_remove_slave(9)w1_DS18B20_convert_temp(9)w1_DS18S20_convert_temp(9)w1_DS1825_convert_temp(9)device_family(9)bus_mutex_lock(9)check_family_data(9)bulk_read_support(9)conversion_time(9)temperature_from_RAM(9)int_to_short(9)w1_poll_completion(9)
That's the tea from ./drivers/w1/slaves, dated October 2026 β w1_therm_add_slave(9) signing off! ππβ¨
π¦ 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