mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
mmc_spi: add support for card-detection polling
This patch adds new platform data variable "caps", so platforms could pass theirs capabilities into MMC core (for example, platforms without interrupt on the CD line will most probably want to pass MMC_CAP_NEEDS_POLL). New platform get_cd() callback provided to optimize polling. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
28f52482b4
commit
619ef4b421
2 changed files with 26 additions and 2 deletions
|
@ -23,6 +23,15 @@ struct mmc_spi_platform_data {
|
|||
/* sense switch on sd cards */
|
||||
int (*get_ro)(struct device *);
|
||||
|
||||
/*
|
||||
* If board does not use CD interrupts, driver can optimize polling
|
||||
* using this function.
|
||||
*/
|
||||
int (*get_cd)(struct device *);
|
||||
|
||||
/* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
|
||||
unsigned long caps;
|
||||
|
||||
/* how long to debounce card detect, in msecs */
|
||||
u16 detect_delay;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue