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

DebBarma, Tarun Kanti tarun.kanti at ti.com
Wed Oct 20 09:11:54 EDT 2010


> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> owner at vger.kernel.org] On Behalf Of kishore kadiyala
> Sent: Friday, October 01, 2010 8:15 PM
> To: Varadarajan, Charulatha
> Cc: Samuel Ortiz; linux-mmc at vger.kernel.org; linux-omap at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org; tony at atomide.com; akpm at linux-
> foundation.org; Chikkature Rajashekar, Madhusudhan;
> adrian.hunter at nokia.com
> Subject: Re: [PATCH v4 1/4] omap4 hsmmc: Adding card detect support for
> MMC1
> 
> On Fri, Oct 1, 2010 at 8:11 PM, Varadarajan, Charulatha <charu at ti.com>
> wrote:
> >
> > <<snip>>
> >
> >> >> >>>> diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
> >> >> >>>> index 6de90bf..e64894c 100644
> >> >> >>>> --- a/include/linux/i2c/twl.h
> >> >> >>>> +++ b/include/linux/i2c/twl.h
> >> >> >>>> @@ -141,6 +141,16 @@
> >> >> >>>>  #define TWL6030_CHARGER_CTRL_INT_MASK  0x10
> >> >> >>>>  #define TWL6030_CHARGER_FAULT_INT_MASK         0x60
> >> >> >>>>
> >> >> >>>> +#define TWL6030_MMCCTRL                0xEE
> >> >> >>>> +#define VMMC_AUTO_OFF                  (0x1 << 3)
> >> >> >>>> +#define SW_FC                          (0x1 << 2)
> >> >> >>>> +#define STS_MMC                        0x1
> >> >> >>>> +
> >> >> >>>> +#define TWL6030_CFG_INPUT_PUPD3        0xF2
> >> >> >>>> +#define MMC_PU                         (0x1 << 3)
> >> >> >>>> +#define MMC_PD                         (0x1 << 2)
> >> >> >>>> +
> >> >> >>>> +
> >> >> >>>>
> >> >> >>>>  #define TWL4030_CLASS_ID               0x4030
> >> >> >>>>  #define TWL6030_CLASS_ID               0x6030
> >> >> >>>> @@ -173,6 +183,27 @@ int twl_i2c_read(u8 mod_no, u8
> >> *value, u8 reg, unsigned num_bytes);
> >> >> >>>>  int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
> >> >> >>>>  int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
> >> >> >>>>
> >> >> >>>> +/* Card detect Configuration for MMC1 Controller on OMAP4 */
> >> >> >>>> +#ifdef CONFIG_TWL4030_CORE
> >> >> >>>> +int twl6030_mmc_card_detect_config(void);
> >> >> >>>> +#else
> >> >> >>>> +static inline int twl6030_mmc_card_detect_config(void)
> >> >> >>>> +{
> >> >> >>>> +       pr_debug("twl6030_mmc_card_detect_config not
> >> supported\n");
> >> >> >>>> +       return 0;
> >> >> >>>> +}
> >> >> >>>> +#endif
> >> >> >>>> +
> >> >> >>>> +/* MMC1 Controller on OMAP4 uses Phoenix irq for
> >> Card detect */
> >> >> >>>> +#ifdef 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_debug("Call back twl6030_mmc_card_detect
> >> not supported\n");
> >
> > Use dev_dbg() instead of pr_debug...
> > Same comment applies across this patch series whereever pr_err/pr_debug
> > APIs are used.
> 
> Couldn't get it  how it makes a difference ? could you explain
One things which I can think of is dev_dbg() would contain the
device name so that you know which device the error is associated with.
-tarun
> 
> >
> >> >> >>>> +       return -EIO;
> >> >> >>>> +}
> >> >> >>>> +#endif
> >
> > <<snip>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the linux-arm-kernel mailing list