summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/cirrus
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2022-07-22 11:48:50 +0200
committerMark Brown <broonie@kernel.org>2022-07-22 14:39:59 +0200
commitdea997733575c5793ca77e166bbbf89097987eb4 (patch)
tree793c474d7cffbf741378f708b7b7f03a64c6367d /drivers/firmware/cirrus
parentASoC: fsl: Fix sparse warning (diff)
downloadlinux-dea997733575c5793ca77e166bbbf89097987eb4.tar.xz
linux-dea997733575c5793ca77e166bbbf89097987eb4.zip
firmware: cs_dsp: Add pre_stop callback
The code already has a post_stop callback, add a matching pre_stop callback to the client_ops that is called before execution is stopped. This callback provides a convenient place for the client code to communicate with the DSP before it is stopped. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220722094851.92521-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/firmware/cirrus')
-rw-r--r--drivers/firmware/cirrus/cs_dsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 7dad6f57d970..b402f841d72c 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -2725,6 +2725,9 @@ void cs_dsp_stop(struct cs_dsp *dsp)
mutex_lock(&dsp->pwr_lock);
+ if (dsp->client_ops->pre_stop)
+ dsp->client_ops->pre_stop(dsp);
+
dsp->running = false;
if (dsp->ops->stop_core)