spi_res_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_res_add πŸ’…

okay bestie, so this is spi_res_add(9) from the Kernel API Manual β€” yes, that's the manual name, we're in kernel land now 🫢 β€” and honestly? It's giving tiny-but-mighty. One job, does it well, no notes. ✨


🌸 NAME 🌸

spi_res_add β€” literally just adds a spi_res to the spi_message. That's it. That's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void spi_res_add (struct spi_message *message , void *res );

Not me being obsessed with how clean this signature is 😭 β€” it returns void, so no return-value drama, no checking, just vibes and a side effect. πŸ’œ


✨ ARGUMENTS ✨

  • message β€” the SPI message πŸ’Œ like, the actual struct spi_message we're gluing this resource onto. It's the main character here.
  • res β€” the spi_resource, typed as void * because the kernel loves a little mystery πŸ™ˆ. This is the thing getting added.

πŸ”₯ SEE ALSO πŸ”₯

okay so this is the part where the manpage just SPILLS the whole SPI friend group at us. Every single one, no cap, here they are πŸ‘‘:

Kernel file ./drivers/spi/spi.c

__spi_register_driver(9), spi_alloc_device(9), spi_add_device(9), spi_new_device(9), spi_unregister_device(9), spi_register_board_info(9), spi_res_alloc(9), spi_res_free(9), spi_res_release(9), spi_finalize_current_transfer(9), __spi_pump_messages(9), spi_pump_messages(9), spi_take_timestamp_pre(9), spi_take_timestamp_post(9), spi_set_thread_rt(9), spi_get_next_queued_message(9), spi_finalize_current_message(9), spi_queued_transfer(9), spi_flush_queue(9), of_register_spi_devices(9), spi_new_ancillary_device(9), devm_spi_new_ancillary_device(9), acpi_spi_count_resources(9), acpi_spi_device_alloc(9), spi_target_abort(9), __spi_alloc_controller(9), __devm_spi_alloc_controller(9), spi_get_gpio_descs(9), spi_register_controller(9), devm_spi_register_controller(9), spi_unregister_controller(9), spi_replace_transfers(9), spi_split_transfers_maxsize(9), spi_split_transfers_maxwords(9), spi_set_cs_timing(9), spi_setup(9), spi_optimize_message(9), spi_unoptimize_message(9), devm_spi_optimize_message(9), spi_async(9), spi_sync(9), spi_sync_locked(9), spi_bus_lock(9), spi_bus_unlock(9), spi_write_then_read(9)

like… that's the entire SPI extended universe, bestie πŸ˜­πŸ’€ go read literally any of them and you'll be fine fr fr.


🫢 gentle reminder that res is a void *, so the typing is on you β€” the compiler isn't gonna hold your hand here, bestie.

and that's the whole page!! mwah πŸ’– this one lives in ./drivers/spi, dated October 2026, and it's titled spi_res_add(9) β€” slay, bye βœ¨πŸŽ€

πŸ“¦ where this page comes from