mmc_gpiod_request_cd(9)
π NAME π
mmc_gpiod_request_cd β ok so this is the one that requests a gpio descriptor for card-detection, bestie π
(also hi, you're reading the Kernel API Manual, welcome to the function-flavored corner of the kernel β¨)
πΈ SYNOPSIS πΈ
int mmc_gpiod_request_cd (struct mmc_host *host , const char *con_id ,
unsigned int idx , bool override_active_level , unsigned int debounce );
π¦ ARGUMENTS π¦
hostβ the mmc host, the main character of this whole situation πcon_idβ the function within the GPIO consumer, iykykidxβ index of the GPIO to obtain in the consumer, like which one you're grabbing off the shelf πoverride_active_levelβ ignore theGPIO_ACTIVE_LOWflag. yes literally ignore it, that's the whole vibe πdebounceβ debounce time in microseconds β±οΈ
β¨ DESCRIPTION β¨
π¨ okay listen up because this part matters: this must be called prior tommc_add_hostβ otherwise the caller must also callmmc_gpiod_request_cd_irq. no cap, that's the rule π
Returns zero on success, else an error. that's it, that's the contract π«Ά
π SEE ALSO π
- Kernel file
./drivers/mmc/core/slot-gpio.c mmc_gpiod_set_cd_config(9)mmc_gpiod_request_ro(9)
go read those too, they're lowkey iconic β
and that's the page!! sourced from ./drivers/mmc/core, dated October 2026 β slay, you made it to the end, 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