mmc: Add runtime and system-wide PM to the TMIO MMC driver
Add runtime and system-wide power management to the TMIO MMC driver in PIO and DMA modes, allowing it to properly save and restore its state during system suspend. Runtime PM is very crude ATM, because the controller has to be powered on all the time to detect card hotplug events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Tento commit je obsažen v:

odevzdal
Chris Ball

rodič
3b0beafc92
revize
e6ee7182c3
@@ -51,6 +51,8 @@ struct tmio_mmc_host {
|
||||
void (*set_pwr)(struct platform_device *host, int state);
|
||||
void (*set_clk_div)(struct platform_device *host, int state);
|
||||
|
||||
int pm_error;
|
||||
|
||||
/* pio related stuff */
|
||||
struct scatterlist *sg_ptr;
|
||||
struct scatterlist *sg_orig;
|
||||
@@ -120,4 +122,12 @@ static inline void tmio_mmc_release_dma(struct tmio_mmc_host *host)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
int tmio_mmc_host_suspend(struct device *dev);
|
||||
int tmio_mmc_host_resume(struct device *dev);
|
||||
#else
|
||||
#define tmio_mmc_host_suspend NULL
|
||||
#define tmio_mmc_host_resume NULL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele