acpi_dma_re...chan_by_name(9)
β¨ acpi_dma_re...chan_by_name(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this is acpi_dma_re...chan_by_name(9) and yes the title got truncated by the terminal, she's dramatic like that π we're literally about to learn how to grab a DMA slave channel by name and honestly? iconic.
πΈ NAME πΈ
acpi_dma_request_slave_chan_by_name β Get the DMA slave channel π¦
β SYNOPSIS β
struct dma_chan * acpi_dma_request_slave_chan_by_name (struct device
*dev , const char *name );
like, that's the whole vibe. she returns a struct dma_chan *, no cap π
π ARGUMENTS π
devβ thestruct deviceyou're getting the DMA request from π«Ά it's giving "who is this for"nameβ represents the corresponding FixedDMA descriptor fordevβ¨ i.e. the little label that tells us which descriptor we're eyeing π
π DESCRIPTION π
so here's the tea β β in order to support both Device Tree and ACPI in a single driver, we translate the names "tx" and "rx" right here, based on the most common case where the first FixedDMA descriptor is TX and the second is RX π₯ literally the classic setup, iykyk.
and if the device has a "dma-names" property? π then the FixedDMA descriptor indices are retrieved based on those β slay, proper lookup, main character energy β¨
otherwise the function falls back using hardcoded indices π (yes, the fallback is real, she's got a backup plan bestie π )
π RETURN π
Pointer to the appropriate dma channel on success π or an error pointer π (so like, always vibe check your return value, fr fr)
β οΈ heads up: it can come back as an error pointer β not NULL, an error pointer β so treat it accordingly before you go dereferencing anything π
π§ SEE ALSO π§
Kernel file ./drivers/dma/acpi-dma.c β and her whole friend group π:
acpi_dma_parse_resource_group(9)acpi_dma_parse_csrt(9)acpi_dma_controller_register(9)acpi_dma_controller_free(9)devm_acpi_dma_controller_register(9)acpi_dma_update_dma_spec(9)acpi_dma_parse_fixed_dma(9)acpi_dma_request_slave_chan_by_index(9)acpi_dma_simple_xlate(9)
and that's the page babes π«Ά brought to you by the fine folks over at ./drivers/dma, dated October 2026 β go forth and request your channels responsibly, ily, bye πππ
π¦ 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