Madhu, On Thu, Aug 5, 2010 at 4:26 AM, Madhusudhan <madhu.cr@xxxxxx> wrote: > <snip> > >> >> > arch/arm/mach-omap2/board-4430sdp.c | 7 +++- >> >> > drivers/mfd/twl6030-irq.c | 76 >> >> +++++++++++++++++++++++++++++++++++ >> >> > drivers/mmc/host/omap_hsmmc.c | 4 +- >> >> > include/linux/i2c/twl.h | 16 +++++++ >> >> > 4 files changed, 100 insertions(+), 3 deletions(-) >> >> > >> >> > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach- >> >> omap2/board-4430sdp.c >> >> > index f287461..388b96d 100644 >> >> > --- a/arch/arm/mach-omap2/board-4430sdp.c >> >> > +++ b/arch/arm/mach-omap2/board-4430sdp.c >> >> > @@ -227,9 +227,14 @@ static int omap4_twl6030_hsmmc_late_init(struct >> >> device *dev) >> >> > struct omap_mmc_platform_data *pdata = dev->platform_data; >> >> > >> >> > /* Setting MMC1 Card detect Irq */ >> >> > - if (pdev->id == 0) >> >> > + if (pdev->id == 0) { >> >> > + ret = twl6030_mmc_card_detect_config(); >> >> > + if (ret) >> >> > + pr_err("Failed configuring MMC1 card >> detect\n"); >> >> > pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + >> >> > MMCDETECT_INTR_OFFSET; >> >> > + pdata->slots[0].card_detect = >> twl6030_mmc_card_detect; > > You are assigning an exported fn here. > > What if somebody disables CONFIG_TWL4030_CORE in the omap_4430sdp_defconfig > file? Does the driver behave nicely with only loosing the hotplug > capability? On mainline 2.6.35 omap3_defconfig works for OMAP4 but without hotplug functionality Disabling CONFIG_TWL4030_CORE in defconfig means disabling regulator's and eventually on bootup mmc host drivers probe fails as omap_hsmmc_reg_get( ) fails. Seems like MMC and TWL are tightly coupled because of LDO dependency. With this V6 patch and omap3_defconfig , disabling CONFIG_TWL4030_CORE [also need to disable USB & comment board-devkit8000.c in mach-omap2/Makefile as they have dependency on twl_i2c_write_u8/twl_i2c_read_u8 defined in twl-core.c] doesn't compile due to undefined reference to those exported functions twl6030_mmc_card_detect_config & twl6030_mmc_card_detect . Having below one[in twl.h] in addition to V6 : /* Card detect Configuration for MMC1 Controller on OMAP4 */ +#if defined(CONFIG_TWL4030_CORE) int twl6030_mmc_card_detect_config(void); +#else +static inline int twl6030_mmc_card_detect_config(void) +{ + pr_err("twl6030_mmc_card_detect_config not supported\n"); + return 0; +} +#endif /* MMC1 Controller on OMAP4 uses Phoenix irq for Card detect */ +#if defined(CONFIG_TWL4030_CORE) int twl6030_mmc_card_detect(struct device *dev, int slot); - +#else +static inline int twl6030_mmc_card_detect(struct device *dev, int slot) +{ + pr_err("Call back twl6030_mmc_card_detect not supported\n"); + return -EIO; +} +#endif With the above change compilation as well as booting goes well but mmc probe fails. Shall I go with above changes and post V7 ? <snip> Thanks , Kishore -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html