summaryrefslogtreecommitdiff
path: root/include/linux/firmware
diff options
context:
space:
mode:
authorSimon Trimmer <simont@opensource.cirrus.com>2024-03-25 14:31:23 +0300
committerMark Brown <broonie@kernel.org>2024-04-03 18:10:27 +0300
commit4d0333798ebbfa1683cc3bc056d1b25b8c24344c (patch)
tree13e12cd19701428123883f00814844c4689438d8 /include/linux/firmware
parentf193957b0fbbba397c8bddedf158b3bf7e4850fc (diff)
downloadlinux-4d0333798ebbfa1683cc3bc056d1b25b8c24344c.tar.xz
firmware: cs_dsp: Add locked wrappers for coeff read and write
It is a common pattern for functions to take and release the DSP pwr_lock over the cs_dsp calls to read and write firmware controls. Add wrapper functions to do this sequence so that the calling code can be simplified to a single function call.. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://msgid.link/r/20240325113127.112783-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/firmware')
-rw-r--r--include/linux/firmware/cirrus/cs_dsp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/firmware/cirrus/cs_dsp.h b/include/linux/firmware/cirrus/cs_dsp.h
index 29cd11d5a3cf..6097b1f701f1 100644
--- a/include/linux/firmware/cirrus/cs_dsp.h
+++ b/include/linux/firmware/cirrus/cs_dsp.h
@@ -239,8 +239,12 @@ void cs_dsp_cleanup_debugfs(struct cs_dsp *dsp);
int cs_dsp_coeff_write_acked_control(struct cs_dsp_coeff_ctl *ctl, unsigned int event_id);
int cs_dsp_coeff_write_ctrl(struct cs_dsp_coeff_ctl *ctl, unsigned int off,
const void *buf, size_t len);
+int cs_dsp_coeff_lock_and_write_ctrl(struct cs_dsp_coeff_ctl *ctl, unsigned int off,
+ const void *buf, size_t len);
int cs_dsp_coeff_read_ctrl(struct cs_dsp_coeff_ctl *ctl, unsigned int off,
void *buf, size_t len);
+int cs_dsp_coeff_lock_and_read_ctrl(struct cs_dsp_coeff_ctl *ctl, unsigned int off,
+ void *buf, size_t len);
struct cs_dsp_coeff_ctl *cs_dsp_get_ctl(struct cs_dsp *dsp, const char *name, int type,
unsigned int alg);