From: Mark Brown <broonie@kernel.org>
To: Andy Chiu <andy.chiu@sifive.com>
Cc: palmer@dabbelt.com, paul.walmsley@sifive.com,
linux-spi@vger.kernel.org, linux-riscv@lists.infradead.org,
Greentime Hu <greentime.hu@sifive.com>
Subject: Re: [PATCH next 1/1] spi: sifive: add PM callbacks to support suspend/resume
Date: Fri, 10 Jun 2022 13:04:39 +0100 [thread overview]
Message-ID: <YqMzV/kXeHso3QW+@sirena.org.uk> (raw)
In-Reply-To: <20220610074459.3261383-2-andy.chiu@sifive.com>
[-- Attachment #1.1: Type: text/plain, Size: 594 bytes --]
On Fri, Jun 10, 2022 at 03:44:59PM +0800, Andy Chiu wrote:
> +static int sifive_spi_suspend(struct device *dev)
> +{
> + struct spi_master *master = dev_get_drvdata(dev);
> + struct sifive_spi *spi = spi_master_get_devdata(master);
> + int ret;
> +
> + ret = spi_master_suspend(master);
> + if (ret)
> + return ret;
> +
> + /* Disable all the interrupts just in case */
> + sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0);
> +
> + clk_disable_unprepare(spi->clk);
Seems like the clock managemnet could usefully be done as runtime PM
too? In any case, that can be done as an incremental change.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-06-10 12:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 7:44 [PATCH next 0/1] Add simple PM operations to sifive-spi Andy Chiu
2022-06-10 7:44 ` [PATCH next 1/1] spi: sifive: add PM callbacks to support suspend/resume Andy Chiu
2022-06-10 12:04 ` Mark Brown [this message]
2022-06-22 3:06 ` Andy Chiu
2022-06-22 10:24 ` Andy Shevchenko
2022-06-10 12:05 ` [PATCH next 0/1] Add simple PM operations to sifive-spi Mark Brown
2022-06-10 15:59 ` Mark Brown
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=YqMzV/kXeHso3QW+@sirena.org.uk \
--to=broonie@kernel.org \
--cc=andy.chiu@sifive.com \
--cc=greentime.hu@sifive.com \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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