STRUCT MCI_SLOT_PDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct mci_slot_pdata(9) β€” bestie's guide to per-slot config ✨

okay so this is a page from the Kernel API Manual (struct mci_slot_pdata(9)), and it's literally just describing a lil struct that holds board-specific per-slot configuration. very demure, very mindful. let's get into it πŸŽ€


🌸 NAME 🌸

struct mci_slot_pdata β€” board-specific per-slot configuration πŸ’…


✨ SYNOPSIS ✨

struct mci_slot_pdata {
    unsigned int            bus_width;
    struct gpio_desc        *detect_pin;
    struct gpio_desc        *wp_pin;
    bool non_removable;
 };

no cap, that's the whole struct. four fields. she's compact and she knows it 🫢


πŸ¦‹ Members πŸ¦‹

  • bus_width β€” how many data lines are actually wired up the slot. count 'em πŸ”’
  • detect_pin β€” the GPIO pin that's wired to the card detect switch. she's the one who notices when a card shows up πŸ‘€
  • wp_pin β€” the GPIO pin wired to the write protect sensor. protect the writes, protect the vibe πŸ”₯
  • non_removable β€” the slot is not removable, so only detect once. main character energy: she stays put πŸ’€

πŸ’œ Description πŸ’œ

okay so if a given slot is not present on the board, set bus_width to 0. and when you do that, the other fields are just ignored β€” literally they don't matter at all in this case, so don't stress about them πŸ™ˆ

any pins that aren't available? set them to a negative value. negative. like, "this pin is not the vibe" negative πŸ“

⚠️ heads up bestie: support for multiple slots is experimental β€” some cards might get upset if we don't get the clock management exactly right. ngl that's a real risk 😭 but in most cases, it should work just fine. she usually slays ✨

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/mmc/host/atmel-mci.c πŸ“
  • struct atmel_mci(9)
  • struct atmel_mci_slot(9)

go read those next, iykyk πŸ’–


and that's the whole page, bestie! sources say this one lives in ./drivers/mmc/host, dated October 2026, and yes β€” she's struct mci_slot_pdata(9), iconic from start to finish πŸ‘‘β­

πŸ“¦ where this page comes from