Re: [PATCH v3 1/4] omap4 hsmmc: Adding card detect support for MMC1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hari,

On Thu, Sep 23, 2010 at 1:19 AM, Kanigeri, Hari <h-kanigeri2@xxxxxx> wrote:
> 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.

>From future perspective,since there are 5 MMC controllers on OMAP4
and current patch supports card detect feature only for one controller i.e MMC1
as of now. Once the interfaces connected on the remaining 4 MMC controllers
are defined further additions will be required for respective cases.

<snip>

Regards,
Kishore
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux