All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: kai.vehmanen@linux.intel.com,
	Keyon Jie <yang.jie@linux.intel.com>,
	lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com,
	Bard Liao <bard.liao@intel.com>
Subject: [PATCH 3/4] ASoC: SOF: sof-pci-dev: add .shutdown() callback
Date: Wed, 13 Jan 2021 17:26:16 +0200	[thread overview]
Message-ID: <20210113152617.4048541-3-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20210113152617.4048541-1-kai.vehmanen@linux.intel.com>

From: Keyon Jie <yang.jie@linux.intel.com>

Add the .shutdown() callback to the sof-pci-dev driver, to help to
handle shutting down specific tasks for SOF PCI platforms.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/sof-pci-dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 63b989e3ec40..5f53c3e76e6f 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -450,6 +450,11 @@ static void sof_pci_remove(struct pci_dev *pci)
 	pci_release_regions(pci);
 }
 
+static void sof_pci_shutdown(struct pci_dev *pci)
+{
+	snd_sof_device_shutdown(&pci->dev);
+}
+
 /* PCI IDs */
 static const struct pci_device_id sof_pci_ids[] = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD)
@@ -523,6 +528,7 @@ static struct pci_driver snd_sof_pci_driver = {
 	.id_table = sof_pci_ids,
 	.probe = sof_pci_probe,
 	.remove = sof_pci_remove,
+	.shutdown = sof_pci_shutdown,
 	.driver = {
 		.pm = &sof_pci_pm,
 	},
-- 
2.29.2


  parent reply	other threads:[~2021-01-13 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 15:26 [PATCH 1/4] ASoC: SOF: add .shutdown() callback to snd_sof_dsp_ops Kai Vehmanen
2021-01-13 15:26 ` [PATCH 2/4] ASoC: SOF: add snd_sof_device_shutdown() helper for shutdown Kai Vehmanen
2021-01-13 15:26 ` Kai Vehmanen [this message]
2021-01-13 15:26 ` [PATCH 4/4] ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callback Kai Vehmanen
2021-01-13 17:53 ` [PATCH 1/4] ASoC: SOF: add .shutdown() callback to snd_sof_dsp_ops 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=20210113152617.4048541-3-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yang.jie@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.