[PATCH v3 1/4] omap4 hsmmc: Adding card detect support for MMC1
Kanigeri, Hari
h-kanigeri2 at ti.com
Wed Sep 22 15:49:17 EDT 2010
Kishore,
> +int twl6030_mmc_card_detect(struct device *dev, int slot)
> +{
> + int ret = -EIO;
> + u8 read_reg = 0;
> + struct platform_device *pdev = to_platform_device(dev);
> +
> + switch (pdev->id) {
> + case 0:
> + /*
> + * BIT0 of REG_MMC_CTRL
> + * 0 - Card not present ,1 - Card present
> + */
> + ret = twl_i2c_read_u8(TWL6030_MODULE_ID0, &read_reg,
> + TWL6030_MMCCTRL);
> + if (ret >= 0)
> + ret = read_reg & STS_MMC;
> + break;
nitpick: may be you don't need a switch statement for only one case.
> + default:
> + pr_err("Unkown MMC controller %d in %s\n", pdev->id,
> __func__);
Thank you,
Best regards,
Hari
More information about the linux-arm-kernel
mailing list