spi_split_transfers_maxsize(9)
πΈ spi_split_transfers_maxsize(9) πΈ
okay bestie, welcome to the kernel API manual page for spi_split_transfers_maxsize β yes that's the whole vibe, and yes it's a (9) page, so it's a kernel-internal one, iykyk π
β¨ NAME β¨
spi_split_transfers_maxsize β split spi transfers into multiple transfers when an individual transfer exceeds a certain size π
like, if one transfer is doing Too Much, this function chops it up. main character energy for your SPI messages, fr fr.
π¦ SYNOPSIS π¦
int spi_split_transfers_maxsize (struct spi_controller *ctlr , struct
spi_message *msg , size_t maxsize );
π ARGUMENTS π
ctlrβ thespi_controllerfor this transfer π (the controller in question, the one running the show)msgβ thespi_messageto transform β¨ (this is the message getting the glow-up)maxsizeβ the maximum when to apply this πΈ (i.e. the size threshold that triggers the whole thing)
π DESCRIPTION π
So here's the tea β β this function allocates resources that are automatically freed during the spi message unoptimize phase.
Which meansβ¦ this function should only be called from optimize_message callbacks. periodt. π
Don't try to call it from anywhere else, bestie, the cleanup only happens in that unoptimize phase, and we're not about to leak. nope. not on our watch π
β RETURN β
status of transformation π« (yes, that's the whole return description β she's concise, she's iconic)
π SEE ALSO π
the whole friend group, gathered together π«Ά β and it is a long guest list, so buckle up:
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_add(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_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)
ok but seriously: optimize_message callbacks only. the resources get freed in the unoptimize phase, so calling this anywhere else is a no-no ππ
and that's the page, bestie! π this little love letter lives in the source tree under ./drivers/spi (yeah, the ./drivers/spi directory), dated October 2026 in the footer, and it's filed under the manual name spi_split_transfers_maxsize(9) β go forth and split those transfers responsibly, mwah π«Άπβ¨
π¦ 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