From: <Frank.Li@freescale.com>
To: <computersforpeace@gmail.com>, <shijie8@gmail.com>,
<lznuaa@gmail.com>, <linux-mtd@lists.infradead.org>
Cc: Allen Xu <b45815@freescale.com>, Frank Li <Frank.Li@freescale.com>
Subject: [PATCH 1/1 v2] mtd: spi-nor: fsl-qspi: support deep sleep mode for imx6 sx chip
Date: Tue, 13 Jan 2015 04:56:40 +0800 [thread overview]
Message-ID: <1421096200-28174-1-git-send-email-Frank.Li@freescale.com> (raw)
From: Allen Xu <b45815@freescale.com>
i.mx6 sx support turn off fastmix and megamix power.
qpsi controller can be turned off and all status lost when suspend/resume.
add suspend/resume functions and reset qspi controller when resume.
Signed-off-by: Allen Xu <b45815@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
Change from v1 to v2
- fix typo fro
- remove term DSM.
drivers/mtd/spi-nor/fsl-quadspi.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 39763b9..9d608007 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -972,6 +972,22 @@ static int fsl_qspi_remove(struct platform_device *pdev)
return 0;
}
+static int fsl_qspi_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ return 0;
+}
+
+static int fsl_qspi_resume(struct platform_device *pdev)
+{
+ struct fsl_qspi *q = platform_get_drvdata(pdev);
+
+ fsl_qspi_nor_setup(q);
+ fsl_qspi_set_map_addr(q);
+ fsl_qspi_nor_setup_last(q);
+
+ return 0;
+}
+
static struct platform_driver fsl_qspi_driver = {
.driver = {
.name = "fsl-quadspi",
@@ -980,6 +996,8 @@ static struct platform_driver fsl_qspi_driver = {
},
.probe = fsl_qspi_probe,
.remove = fsl_qspi_remove,
+ .suspend = fsl_qspi_suspend,
+ .resume = fsl_qspi_resume,
};
module_platform_driver(fsl_qspi_driver);
--
1.9.1
next reply other threads:[~2015-01-12 22:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 20:56 Frank.Li [this message]
2015-01-13 0:52 ` [PATCH 1/1 v2] mtd: spi-nor: fsl-qspi: support deep sleep mode for imx6 sx chip Huang Shijie
2015-01-16 3:31 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421096200-28174-1-git-send-email-Frank.Li@freescale.com \
--to=frank.li@freescale.com \
--cc=b45815@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=lznuaa@gmail.com \
--cc=shijie8@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox