[PATCH 6/6] mtd: pxa3xx_nand: Gate/ungate the NAND clock in suspend/resume paths
Ezequiel Garcia
ezequiel at vanguardiasur.com.ar
Wed Nov 4 08:13:46 PST 2015
The NAND clock can be disabled on suspend and enabled on resume.
Signed-off-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
---
drivers/mtd/nand/pxa3xx_nand.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 0e6eb6c1f9b3..13371d6e9ba5 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1936,12 +1936,18 @@ static int pxa3xx_nand_suspend(struct device *dev)
return -EAGAIN;
}
+ clk_disable(info->clk);
return 0;
}
static int pxa3xx_nand_resume(struct device *dev)
{
struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
+ int ret;
+
+ ret = clk_enable(info->clk);
+ if (ret < 0)
+ return ret;
/* We don't want to handle interrupt without calling mtd routine */
disable_int(info, NDCR_INT_MASK);
--
2.5.2
More information about the linux-mtd
mailing list