sdw_nwrite(9)
π« sdw_nwrite β the kernel API manual, but make it make sense π«
okay so bestie, welcome to sdw_nwrite(9) from the Kernel API Manual β this is the one that writes "n" contiguous SDW Slave registers β¨
πΈ NAME πΈ
sdw_nwrite β write "n" contiguous SDW Slave registers π
π SYNOPSIS π
int sdw_nwrite (struct sdw_slave *slave , u32 addr , size_t count ,
const u8 *val );
like, that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
slaveβ the SDW Slave, obviously πββοΈaddrβ the register address, as in where we're writingcountβ length, aka how many of the thingsvalβ the buffer holding the values you wanna write
β¨ DESCRIPTION β¨
so here's the tea β β this version of the function will take a PM reference to the slave device. literally grabbing that reference before it does anything else, periodt.
π fair warning bestie: if the message crosses a page boundary, each page will be transferred under a separate invocation of the msg_lock. not one big lock, not two pages for the price of one β separate invocations. that's just how it is π
π SEE ALSO π
all the sibling functions, iykyk π§ β and the kernel file you'll find them hanging out in:
- kernel file
./drivers/soundwire/bus.c 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_read(9)sdw_write(9)sdw_bus_prep_clk_stop(9)sdw_bus_clk_stop(9)sdw_bus_exit_clk_stop(9)sdw_handle_slave_status(9)
okay that's the whole page, mwah π β this iconic little number lives in ./drivers/soundwire, dated October 2026, and it's sdw_nwrite(9) forever and ever ππβ
π¦ 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