RE: [PATCH 3/4 v5] SDHCI: add sdhci_get_cd callback to detect the card

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

 




> -----Original Message-----
> From: Aaron Lu [mailto:aaron.lu@xxxxxxx]
> Sent: Friday, January 13, 2012 2:21 PM
> To: Huang Changming-R66093
> Cc: linux-mmc@xxxxxxxxxxxxxxx; Chris Ball
> Subject: Re: [PATCH 3/4 v5] SDHCI: add sdhci_get_cd callback to detect
> the card
> 
> On Fri, Jan 13, 2012 at 04:50:11AM +0000, Huang Changming-R66093 wrote:
> >
> >
> > > I think this function has to take care of standard sd host
> > > behaviour: if a specific host has implemented the get_cd callback,
> > > then use it; if not, then see the BROKEN_DETECT quirk; finally, use
> > > the present register to get the value like the sdhci_request function
> does.
> > >
> > Yes, I have thought about it.
> > In this patch, only FSL eSDHC use it.
> 
> Only FSL eSDHC defines it, but all sd hosts will use it since the call is
> made in core.c with host->ops->get_cd.
First, I check if the get_cd is defined, if no, this callback can't be called.

> If you only cares about FSL eSDHC, then probably you should do this in
> sdhci.c instead of core.c, by adding a callback to the sdhci_ops and in
> the sdhci_request call, instead of checking present register, call the
> get_cd callback if available.
> 
Maybe you can read my patch carefully. 
In file "drivers/mmc/host/sdhci.c", I just implement the callback get_cd,
And add new callback or hook (get_cd in structre sdhci_ops) to detect the card in the special platform.

--
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


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux