From: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
To: Kamal Dasu <kdasu.kdev@gmail.com>, marek.vasut@gmail.com
Cc: boris.brezillon@free-electrons.com, f.fainelli@gmail.com,
richard@nod.at, linux-kernel@vger.kernel.org,
linux-mtd@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com,
computersforpeace@gmail.com
Subject: Re: [PATCH v8 2/2] mtd: spi-nor: Add spi-nor mtd resume handler
Date: Tue, 10 Oct 2017 18:25:58 +0200 [thread overview]
Message-ID: <479a28e4-19bf-514a-e3ca-67e9a2d193dd@wedev4u.fr> (raw)
In-Reply-To: <1503434722-5429-3-git-send-email-kdasu.kdev@gmail.com>
Le 22/08/2017 à 22:45, Kamal Dasu a écrit :
> Implemented and populated spi-nor mtd PM handlers for resume ops.
> spi-nor resume op re-initializes spi-nor flash to its probed
> state by calling the newly implemented spi_nor_init() function.
>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Applied to the spi-nor/next branch of l2-mtd
Thanks!
> ---
> drivers/mtd/spi-nor/spi-nor.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index ab98ecff..69164bc 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1871,6 +1871,19 @@ static int spi_nor_init(struct spi_nor *nor)
> return 0;
> }
>
> +/* mtd resume handler */
> +static void spi_nor_resume(struct mtd_info *mtd)
> +{
> + struct spi_nor *nor = mtd_to_spi_nor(mtd);
> + struct device *dev = nor->dev;
> + int ret;
> +
> + /* re-initialize the nor chip */
> + ret = spi_nor_init(nor);
> + if (ret)
> + dev_err(dev, "resume() failed\n");
> +}
> +
> int spi_nor_scan(struct spi_nor *nor, const char *name,
> const struct spi_nor_hwcaps *hwcaps)
> {
> @@ -1947,6 +1960,7 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
> mtd->size = params.size;
> mtd->_erase = spi_nor_erase;
> mtd->_read = spi_nor_read;
> + mtd->_resume = spi_nor_resume;
>
> /* NOR protection support for STmicro/Micron chips and similar */
> if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
>
prev parent reply other threads:[~2017-10-10 16:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 20:45 [PATCH v8 0/2] Add spi-nor flash device pm support Kamal Dasu
2017-08-22 20:45 ` [PATCH v8 1/2] mtd: spi-nor: add spi_nor_init() function Kamal Dasu
2017-10-10 16:25 ` Cyrille Pitchen
2017-08-22 20:45 ` [PATCH v8 2/2] mtd: spi-nor: Add spi-nor mtd resume handler Kamal Dasu
2017-08-23 7:06 ` Cyrille Pitchen
2017-10-10 16:25 ` Cyrille Pitchen [this message]
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=479a28e4-19bf-514a-e3ca-67e9a2d193dd@wedev4u.fr \
--to=cyrille.pitchen@wedev4u.fr \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=kdasu.kdev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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
all inboxes | Powered by JetHome®