reset_select_slave(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ⭐

  • 0 if 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