STRUCT S3C_SDHCI_PLATDATA(9)
π struct s3c_sdhci_platdata(9) β the Samsung SDHCI platform data glow-up β¨
okay bestie, so this is from the Kernel API Manual and it's literally the blueprint for how Samsung SDHCI controllers get configured. it's giving "backstage pass to the hardware" energy, and you're gonna understand every single field by the end. no cap. π«Ά
πΈ SYNOPSIS πΈ
like, here's the whole struct in all its glory β copy it exactly, don't touch a single semicolon:
struct s3c_sdhci_platdata {
unsigned int max_width;
unsigned int host_caps;
unsigned int host_caps2;
unsigned int pm_caps;
enum cd_types cd_type;
int ext_cd_gpio;
bool ext_cd_gpio_invert;
int (*ext_cd_init)(void (*notify_func)(struct platform_device *, int
state));
int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
int state));
void (*cfg_gpio)(struct platform_device *dev, int width);
};
π Members π
every field is a main character, so let's give them all their moment:
max_widthβ the max number of data bits this thing can handle. literally the width limit, periodt. πhost_capsβ the standard MMC host capabilities bit field. the O.G. capabilities slot.host_caps2β the second standard MMC host capabilities bit field. because one bit field was not enough, and honestly? slay. β¨cd_typeβ the type of Card Detection method (peep thecd_typesenum above, iykyk).ext_cd_gpioβ the gpio pin used for the external CD line, but only valid ifcd_type == S3C_SDHCI_CD_GPIO. so don't come for this field unless that condition is met, bestie. πext_cd_gpio_invertβ inverts the values for the external CD gpio line. flip it, reverse it, that's the vibe. πext_cd_initβ initializes the external card detect subsystem. it gets called onsdhci-s3cdriver probe whencd_type == S3C_SDHCI_CD_EXTERNAL. thenotify_funcargument is a callback to thesdhci-s3cdriver that triggers the card detection event. and the callback arguments?devis a pointer to the platform device of the host controller, andstateis the new state of the card (0- removed,1- inserted). so basically it's the "hey bestie, card's here or gone" hotline. πext_cd_cleanupβ cleans up the external card detect subsystem. called onsdhci-s3cdriver remove whencd_type == S3C_SDHCI_CD_EXTERNAL. thenotify_funcargument is the same callback as forext_cd_init. so it's the "we're done here, thanks for everything" moment. π§Ήcfg_gpioβ configures the GPIO for a specific card bit-width. you give itdevandwidthand it does the pin magic. iconic. π§
π Description π
so like, this whole struct is initialisation data β specific to either the machine or the platform β for the device driver to use or call-back when it's configuring gpio or card speed information. think of it as the little instruction card the driver reads before it does its thing. it's not the driver itself, it's the vibe the driver needs. π«
π₯ SEE ALSO π₯
- Kernel file
./include/linux/platform_data/mmc-sdhci-s3c.hβ go read it, it's literally right there and it's lowkey essential. π
and that's the whole page, bestie. this gem comes from ./include/linux/platform_data and it's dated October 2026 β so yeah, it's giving future-forward kernel energy. stay slaying, and remember: always check your cd_type before touching ext_cd_gpio. π«‘π
π¦ 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