STRUCT ATMEL_MCI_SLOT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct atmel_mci_slot(9) β€” MMC slot state ✨

okay so bestie, this is a page straight outta the Kernel API Manual, and it's all about struct atmel_mci_slot πŸ’… which the kernel describes as "MMC slot state" β€” like, that's the whole vibe. one MMC slot, all its state, all its little fields, all living together. let's get into it 🫢


🌸 SYNOPSIS 🌸

here's the whole struct, exactly as it lives, no cap:

struct atmel_mci_slot {
    struct mmc_host         *mmc;
    struct atmel_mci        *host;
    u32 sdc_reg;
    u32 sdio_irq;
    struct mmc_request      *mrq;
    struct list_head        queue_node;
    unsigned int            clock;
    unsigned long           flags;
  #define ATMCI_CARD_PRESENT      0;
  #define ATMCI_CARD_NEED_INIT    1;
  #define ATMCI_SHUTDOWN          2;
    struct gpio_desc        *detect_pin;
    struct gpio_desc        *wp_pin;
    struct timer_list       detect_timer;
 };

like, look at those three #defines chilling in the middle of the struct β€” ATMCI_CARD_PRESENT = 0, ATMCI_CARD_NEED_INIT = 1, ATMCI_SHUTDOWN = 2. iconic placement honestly 😭


πŸŽ€ Members πŸŽ€

  • mmc β€” the mmc_host that's representing this slot. it's the moment, it's the representative πŸ’–
  • host β€” the MMC controller this slot is using. your actual hardware bestie ✨
  • sdc_reg β€” the value of SDCR that you gotta write before using this slot. don't skip this step, fr fr 🫢
  • sdio_irq β€” the SDIO irq mask for this slot. irq mask, but make it cute 🌸
  • mrq β€” the mmc_request that's currently being processed, or waiting to be processed, or just NULL when the slot is idle. three moods, one pointer πŸ’…
  • queue_node β€” a list node for placing this node in the queue list of struct atmel_mci. it's giving "in line, patiently" πŸ¦‹
  • clock β€” the clock rate configured by set_ios. and listen β€” it's protected by host->lock. respect the lock, bestie πŸ”’
  • flags β€” random state bits associated with the slot. random. state. bits. no notes πŸ”₯
  • detect_pin β€” GPIO pin used for card detection, or negative if it's not available. availability check, always πŸ™ˆ
  • wp_pin β€” GPIO pin used for card write protect sending, or negative if it's not available. same energy, different pin πŸ“
  • detect_timer β€” timer used for debouncing detect_pin interrupts. debouncing! she's stabilising the chaos, main character energy β²οΈπŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/mmc/host/atmel-mci.c struct mci_slot_pdata(9), struct atmel_mci(9) β€” go read these next, iykyk πŸ’œ

ok that's the whole page, every field, every define, no skips, no summaries β€” we ate and left no crumbs πŸ’…βœ¨

and a lil sign-off for the credits girlies: this one comes from ./drivers/mmc/host, dated October 2026, and the header/footer both say struct atmel_mci_slot(9) β€” slay πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from