1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-28 17:48:58 +02:00

jz-mmc: Put functions pins to high-z during suspend.

This commit is contained in:
Lars-Peter Clausen 2009-12-02 04:17:50 +01:00
parent 3ae48ccb8c
commit c9674c3ab7

View File

@ -815,17 +815,27 @@ static int jz4740_mmc_remove(struct platform_device *pdev)
static int jz4740_mmc_suspend(struct device *dev)
{
struct jz4740_mmc_host *host = dev_get_drvdata(dev);
/* TODO: Set gpio pins to high Z */
struct jz4740_mmc_platform_data *pdata = host->pdata;
mmc_suspend_host(host->mmc, PMSG_SUSPEND);
if (pdata && pdata->data_1bit)
jz_gpio_bulk_suspend(jz4740_mmc_pins, ARRAY_SIZE(jz4740_mmc_pins) - 3);
else
jz_gpio_bulk_suspend(jz4740_mmc_pins, ARRAY_SIZE(jz4740_mmc_pins));
return 0;
}
static int jz4740_mmc_resume(struct device *dev)
{
struct jz4740_mmc_host *host = dev_get_drvdata(dev);
struct jz4740_mmc_platform_data *pdata = host->pdata;
if (pdata && pdata->data_1bit)
jz_gpio_bulk_resume(jz4740_mmc_pins, ARRAY_SIZE(jz4740_mmc_pins) - 3);
else
jz_gpio_bulk_resume(jz4740_mmc_pins, ARRAY_SIZE(jz4740_mmc_pins));
mmc_resume_host(host->mmc);