mmc_gpiod_request_cd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, iykyk
  • idx β€” index of the GPIO to obtain in the consumer, like which one you're grabbing off the shelf πŸ›’
  • override_active_level β€” ignore the GPIO_ACTIVE_LOW flag. 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 to mmc_add_host β€” otherwise the caller must also call mmc_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 πŸŽ€

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