From: Mark Brown <broonie@kernel.org>
To: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v2 SPI for-next 2/2] spi: microchip: pci1xxxx: Add suspend and resume support for PCI1XXXX SPI driver
Date: Thu, 13 Oct 2022 14:35:27 +0100 [thread overview]
Message-ID: <Y0gUH1fbB/LijKLw@sirena.org.uk> (raw)
In-Reply-To: <20221006050514.115564-3-tharunkumar.pasumarthi@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
On Thu, Oct 06, 2022 at 10:35:14AM +0530, Tharun Kumar P wrote:
> +static int pci1xxxx_spi_resume(struct device *dev)
> +{
> + struct pci1xxxx_spi *spi_ptr = dev_get_drvdata(dev);
> + struct pci1xxxx_spi_internal *spi_sub_ptr;
> + u32 regval = SPI_RESUME_CONFIG;
> + u8 iter;
> +
> + for (iter = 0; iter < spi_ptr->total_hw_instances; iter++) {
> + spi_sub_ptr = spi_ptr->spi_int[iter];
> + spi_master_resume(spi_sub_ptr->spi_host);
> + writel(regval, spi_ptr->reg_base +
> + SPI_MST_EVENT_MASK_REG_OFFSET(iter));
> +
> + /* Restore config at resume */
> + store_restore_config(spi_ptr, spi_sub_ptr, iter, 0);
> + }
> +
> + return 0;
> +}
There should be a call to spi_controller_suspend() in here (and
similarly in resume) to tell the controller to stop the queue of
operations.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-10-13 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 5:05 [PATCH v2 SPI for-next 0/2] spi: microchip: pci1xxxx: Load SPI driver for SPI endpoint of PCI1XXXX switch Tharun Kumar P
2022-10-06 5:05 ` [PATCH v2 SPI for-next 1/2] spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch Tharun Kumar P
2022-10-06 5:05 ` [PATCH v2 SPI for-next 2/2] spi: microchip: pci1xxxx: Add suspend and resume support for PCI1XXXX SPI driver Tharun Kumar P
2022-10-13 13:35 ` Mark Brown [this message]
2022-10-19 4:18 ` Tharunkumar.Pasumarthi
2022-10-20 4:48 ` Tharunkumar.Pasumarthi
2022-10-18 12:45 ` (subset) [PATCH v2 SPI for-next 0/2] spi: microchip: pci1xxxx: Load SPI driver for SPI endpoint of PCI1XXXX switch Mark Brown
2022-11-29 18:02 ` 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=Y0gUH1fbB/LijKLw@sirena.org.uk \
--to=broonie@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=tharunkumar.pasumarthi@microchip.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
all inboxes | Powered by JetHome®