acpi_spi_count_resources(9)
๐ acpi_spi_count_resources(9) โ from the Kernel API Manual, bestie
okay so picture this: you're deep in ACPI land and you just need a headcount of your SpiSerialBus resources. that's literally the whole function. she counts. she returns. she leaves. iconic behaviour honestly โจ
๐ธ NAME ๐ธ
acpi_spi_count_resources โ counts the number of SpiSerialBus resources ๐งฎโจ
๐ SYNOPSIS ๐
int acpi_spi_count_resources (struct acpi_device *adev );
that's it. one (1) argument, one (1) job. no cap. ๐
๐ฆ ARGUMENTS ๐ฆ
adevโ an ACPI device. that's your main character right there ๐ she's the one whose resource-list is getting counted.
โญ RETURN โญ
so what do you get back? the number of SpiSerialBus resources in the ACPI-device's resource-list โ that's your cute little count ๐
orโฆ a negative error code ๐ (yeah, the "it's giving error" situation ๐ญ). check it, bestie, fr fr.
๐ SEE ALSO ๐
the whole spi.c friend group came to the party, and they all showed up in the 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_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 group chat, nobody got left on read ๐ also hi to ./drivers/spi โ that's the directory repping all of this ๐ซถ
and that's the page!! mwah ๐ this came out of ./drivers/spi, dated October 2026, under the acpi_spi_count_resources(9) name โ slay, periodt, go count some resources bestie ๐โญ
๐ฆ 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