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]

 



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.

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.

> For the other platform, the get_cd is NULL.
>




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