mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-29 09:09:53 +02:00
jz-mmc: Put functions pins to high-z during suspend.
This commit is contained in:
parent
3ae48ccb8c
commit
c9674c3ab7
@ -815,17 +815,27 @@ static int jz4740_mmc_remove(struct platform_device *pdev)
|
|||||||
static int jz4740_mmc_suspend(struct device *dev)
|
static int jz4740_mmc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct jz4740_mmc_host *host = dev_get_drvdata(dev);
|
struct jz4740_mmc_host *host = dev_get_drvdata(dev);
|
||||||
|
struct jz4740_mmc_platform_data *pdata = host->pdata;
|
||||||
/* TODO: Set gpio pins to high Z */
|
|
||||||
|
|
||||||
mmc_suspend_host(host->mmc, PMSG_SUSPEND);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int jz4740_mmc_resume(struct device *dev)
|
static int jz4740_mmc_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct jz4740_mmc_host *host = dev_get_drvdata(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);
|
mmc_resume_host(host->mmc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user