drivers/mmc/core/host.h
Source file repositories/reference/linux-study-clean/drivers/mmc/core/host.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/mmc/core/host.h- Extension
.h- Size
- 2066 bytes
- Lines
- 90
- Domain
- Driver Families
- Bucket
- drivers/mmc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mmc/host.h
Detected Declarations
function mmc_retune_clearfunction mmc_retune_hold_nowfunction mmc_retune_recheckfunction mmc_host_can_cmd23function mmc_host_can_done_completefunction mmc_host_can_access_bootfunction mmc_host_can_uhsfunction mmc_card_hs200function mmc_card_ddr52function mmc_card_hs400function mmc_card_hs400esfunction mmc_card_sd_express
Annotated Snippet
#ifndef _MMC_CORE_HOST_H
#define _MMC_CORE_HOST_H
#include <linux/mmc/host.h>
int mmc_register_host_class(void);
void mmc_unregister_host_class(void);
void mmc_retune_enable(struct mmc_host *host);
void mmc_retune_disable(struct mmc_host *host);
void mmc_retune_hold(struct mmc_host *host);
void mmc_retune_release(struct mmc_host *host);
int mmc_retune(struct mmc_host *host);
void mmc_retune_pause(struct mmc_host *host);
void mmc_retune_unpause(struct mmc_host *host);
static inline void mmc_retune_clear(struct mmc_host *host)
{
host->retune_now = 0;
host->need_retune = 0;
}
static inline void mmc_retune_hold_now(struct mmc_host *host)
{
host->retune_now = 0;
host->hold_retune += 1;
}
static inline void mmc_retune_recheck(struct mmc_host *host)
{
if (host->hold_retune <= 1)
host->retune_now = 1;
}
static inline int mmc_host_can_cmd23(struct mmc_host *host)
{
return host->caps & MMC_CAP_CMD23;
}
static inline bool mmc_host_can_done_complete(struct mmc_host *host)
{
return host->caps & MMC_CAP_DONE_COMPLETE;
}
static inline int mmc_host_can_access_boot(struct mmc_host *host)
{
return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC);
}
static inline int mmc_host_can_uhs(struct mmc_host *host)
{
return host->caps & MMC_CAP_UHS;
}
static inline bool mmc_card_hs200(struct mmc_card *card)
{
return card->host->ios.timing == MMC_TIMING_MMC_HS200;
}
static inline bool mmc_card_ddr52(struct mmc_card *card)
{
return card->host->ios.timing == MMC_TIMING_MMC_DDR52;
}
static inline bool mmc_card_hs400(struct mmc_card *card)
{
return card->host->ios.timing == MMC_TIMING_MMC_HS400;
}
static inline bool mmc_card_hs400es(struct mmc_card *card)
{
return card->host->ios.enhanced_strobe;
}
static inline bool mmc_card_sd_express(struct mmc_host *host)
{
return host->ios.timing == MMC_TIMING_SD_EXP ||
host->ios.timing == MMC_TIMING_SD_EXP_1_2V;
}
#endif
Annotation
- Immediate include surface: `linux/mmc/host.h`.
- Detected declarations: `function mmc_retune_clear`, `function mmc_retune_hold_now`, `function mmc_retune_recheck`, `function mmc_host_can_cmd23`, `function mmc_host_can_done_complete`, `function mmc_host_can_access_boot`, `function mmc_host_can_uhs`, `function mmc_card_hs200`, `function mmc_card_ddr52`, `function mmc_card_hs400`.
- Atlas domain: Driver Families / drivers/mmc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.