]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Support clock stop mode 1 if enabled in ACPI
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 11 Mar 2026 14:21:53 +0000 (14:21 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 11 Mar 2026 16:17:10 +0000 (16:17 +0000)
commit48863104d2e1ea70a68cbd8d87c0d75270f3c6e5
tree0b4a23772ed51ead963b589b5da44e28602c89da
parent94ef278e7439c875b83ddbeddb92d1580d566a0c
ASoC: cs35l56: Support clock stop mode 1 if enabled in ACPI

Report the ability to support SoundWire clock-stop mode 1 if this is
enabled in ACPI. Mode 1 allows the device to lose state, so it can
reduce power consumption in clock-stop. Also add the necessary
handling to wait for re-enumeration on resume.

This does not use sdw_slave_read_prop(), because that also fills in
other properties from ACPI that were not previously set by the driver
and this has been observed to break some systems. Instead, the
"mipi-sdw-clock-stop-mode1-supported" property is checked directly.

When a SoundWire peripheral has been put into clock-stop mode 1 it
must be re-enumerated after the clock is restarted. A new flag
sdw_in_clock_stop_1 is set to true in cs35l56_sdw_clk_stop() if the
SoundWire core notifies that it is entering clock-stop 1.
cs35l56_sdw_handle_unattach() will wait for re-enumeration if
sdw_in_clock_stop_1 is true.

sdw_in_clock_stop_1 will be reset to false when an ATTACH notification
is received in cs35l56_sdw_update_status().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260311142153.2201761-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56-sdw.c
sound/soc/codecs/cs35l56.h