reset_select_slave(9)
π reset_select_slave(9) β like, the whole glow-up
okay so this is a page straight outta the Kernel API Manual, bestie. it's about reset_select_slave, and yes we're gonna get into it. π
β¨ NAME β¨
reset_select_slave β reset and select a slave, that's the whole vibe, that's the whole job π«Ά
πΈ SYNOPSIS πΈ
int reset_select_slave (struct w1_slave *sl );
π¦ ARGUMENTS π¦
slβ the slave to select. that's the one, bestie, that's our main character π
π DESCRIPTION π
so what this does is: it resets the bus and then selects the slave by sending a ROM MATCH cmd. simple, iconic, no notes. β¨
now, ngl, there's a whole backstory here: w1_reset_select_slave from w1_io.c could not be used here. why? because it sent a SKIP ROM command if only one device is on the line. and at the beginning of that whole process, sl->master->slave_count is 1 β even if more devices are actually on the line. and that? that causes a collision on the line. ππ
so yeah, that's literally why this function exists. iykyk.
π₯ CONTEXT π₯
the w1 master lock must be held. not optional, not a suggestion, hold the lock fr fr π
β RETURN β
0if success π- a negative kernel error code otherwise π
π SEE ALSO π
Kernel file ./drivers/w1/slaves/w1_therm.c struct w1_therm_family_converter(9), struct w1_therm_family_data(9), struct therm_info(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_add_slave(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)
like, go read those too, they're all slaying in their own way π
ok that's the page!! mwah π
and that's a wrap, bestie β brought to you by ./drivers/w1/slaves, dated October 2026. periodt. ππ
π¦ 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