spi_new_ancillary_device(9)
π spi_new_ancillary_device(9) β the kernel API manual, bestie edition β¨
okay so this is a page from the Kernel API Manual, and it's about registering an ancillary SPI device. yes i know, "ancillary" sounds like a fancy snack, but stick with me π
πΈ NAME πΈ
spi_new_ancillary_device β register an ancillary SPI device, periodt π
β¨ SYNOPSIS β¨
struct spi_device * spi_new_ancillary_device (struct spi_device *spi ,
u8 chip_select );
that's the whole vibe right there π«Ά
π ARGUMENTS π
spiβ pointer to the main SPI device, like the one that's registering the ancillary device. it's giving main character energy, obviously πchip_selectβ the Chip Select of the ancillary device. that's au8, no cap π
π¦ DESCRIPTION π¦
so you're registering an ancillary SPI device. iconic. for example, some chips have one chip-select for normal device usage and another one for setup/firmware upload β literally two different jobs, two different CS lines, iykyk π
β οΈ bestie listen β this may only be called from the main SPI device's probe routine. that's not a suggestion, that's the rule. don't be out here calling it from anywhere else π
β RETURN β
0on success π- negative
errnoon failure π
π SEE ALSO π
these are all the other calls in the kernel file ./drivers/spi/spi.c, so go be obsessed with them too:
__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)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)
and that's the page!! π§ no crumbs left behind, we ate π
πΈ little sign-off: this one lives in./drivers/spi, it's dated October 2026, and it's from the Kernel API Manual βspi_new_ancillary_device(9), slay π β¨
π¦ 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