summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-03-02 16:35:21 +0300
committerMark Brown <broonie@kernel.org>2026-03-02 16:35:21 +0300
commit727d1a1c4eb272164a84d4400dddcdf26ecf502a (patch)
treeaef6a130326beb8307ccbd71509643e4e3ce6b52 /include/linux
parenta8fd392f6e3ad33b87dfdb6d438f05c5bc29d2e6 (diff)
parent17c6bf433742e0c1ff5ce175145877c0194e4a7a (diff)
downloadlinux-727d1a1c4eb272164a84d4400dddcdf26ecf502a.tar.xz
Support wm_adsp hibernation for runtime suspend
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: When the CS35L41 and CS35L45 drivers suspend, they are put into hibernation, and the regmap goes into cache_only, but the firmware is still running, and wm_adsp is not stopped. If userspace attempts to read a firmware control, it will perform a regmap_raw_read() and this will produce an error in the kernel log. To prevent these spurious errors, add an apis into cs_dsp and wm_adsp to allow wm_adsp to hibernate. In this hibernation mode, reads or writes to the dsp controls would be rejected with -EPERM rather than -EBUSY, and no error will be printed to the kernel log.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firmware/cirrus/cs_dsp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/firmware/cirrus/cs_dsp.h b/include/linux/firmware/cirrus/cs_dsp.h
index 0ec1cdc5585d..4e3baa557068 100644
--- a/include/linux/firmware/cirrus/cs_dsp.h
+++ b/include/linux/firmware/cirrus/cs_dsp.h
@@ -179,6 +179,7 @@ struct cs_dsp {
bool booted;
bool running;
+ bool hibernating;
struct list_head ctl_list;
@@ -354,4 +355,6 @@ int cs_dsp_chunk_write(struct cs_dsp_chunk *ch, int nbits, u32 val);
int cs_dsp_chunk_flush(struct cs_dsp_chunk *ch);
int cs_dsp_chunk_read(struct cs_dsp_chunk *ch, int nbits);
+void cs_dsp_hibernate(struct cs_dsp *dsp, bool hibernating);
+
#endif