sdw_write(9)
π sdw_write(9) β the kernel API glow-up π
okay so you're in the <pink>sdw_write</pink> section of the Kernel API Manual (that's the manual name, bestie, we're in the kernel API docs rn) and honestly? iconic behaviour. this one's a little function with big main character energy β it writes to a SoundWire slave register. let's get into it β¨
β¨ SYNOPSIS β¨
int sdw_write (struct sdw_slave *slave , u32 addr , u8 value );
that's the whole vibe. returns an int, takes three things, slays. π
π ARGUMENTS π
slaveβ the SDW Slave. your little guy. the device you're talking to. π«Άaddrβ the Register address, aka where you're poking. πvalueβ the Register value, aka what you're putting there. π
π¦ DESCRIPTION π¦
so here's the tea, and it's literally the whole point: this version of the function will take a PM reference to the slave device. that's it, that's the note. PM reference = taken. no cap. π₯
ngl this is the with-PM flavour of the write β if you were looking for the no-PM one, keep scrolling down to SEE ALSO, bestie, it's right there π
πΈ SEE ALSO πΈ
the whole friend group, in order, no skipping:
- Kernel file
./drivers/soundwire/bus.cβ that's where it lives, periodt. π sdw_bus_master_add(9)sdw_bus_master_delete(9)sdw_transfer(9)sdw_show_ping_status(9)sdw_transfer_defer(9)sdw_nread_no_pm(9)sdw_nwrite_no_pm(9)sdw_write_no_pm(9)sdw_read_no_pm(9)sdw_nread(9)sdw_nwrite(9)sdw_read(9)sdw_bus_prep_clk_stop(9)sdw_bus_clk_stop(9)sdw_bus_exit_clk_stop(9)sdw_handle_slave_status(9)
like, the entire soundwire roster came to the function's birthday party πβ¨
<anything else>no wait i'm kidding, that's genuinely the whole page, it's a short one and we love that for it π
okay bye bestie, go write that register π the source is ./drivers/soundwire, it's dated October 2026, and this little gem is filed at sdw_write(9) β you know where to find it π§ββοΈβ
π¦ 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