[PATCH 1/7] mmc: mxs-mmc: add mmc host driver for i.MX23/28
Arnd Bergmann
arnd at arndb.de
Sun Feb 13 11:10:32 EST 2011
On Monday 14 February 2011 00:52:08 Shawn Guo wrote:
> I rewriting the code to use mmc core card detect polling framework.
>
> static int mxs_mmc_get_cd(struct mmc_host *mmc)
> {
> struct mxs_mmc_host *host = mmc_priv(mmc);
>
> return !(readl(host->base + HW_SSP_STATUS) &
> BM_SSP_STATUS_CARD_DETECT);
> }
>
> static const struct mmc_host_ops mxs_mmc_ops = {
> ...
> .get_cd = mxs_mmc_get_cd,
> };
>
> static int mxs_mmc_probe(struct platform_device *pdev)
> {
> ...
> mmc_caps |= MMC_CAP_NEEDS_POLL;
> ...
> }
>
> It looks pretty simple and mmc core code has taken care of the case
> of power management. So if this looks fine to you, I will go for it
> in v2 of the patch set.
Yes, that looks very good.
Arnd
More information about the linux-arm-kernel
mailing list