]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: cs35l56: Handle OTP read latency over SoundWire
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 5 Aug 2024 14:08:39 +0000 (15:08 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Aug 2024 17:26:29 +0000 (18:26 +0100)
commite42066df07c0fcedebb32ed56f8bc39b4bf86337
tree0849bf328a69b36aa2f2d7c209ae89ad27a49ac2
parent9a1af1e218779724ff29ca75f2b9397dc3ed11e7
ASoC: cs35l56: Handle OTP read latency over SoundWire

Use the late-read buffer in the CS35L56 SoundWire interface to
read OTP memory.

The OTP memory has a longer access latency than chip registers
and cannot guarantee to return the data value in the SoundWire
control response if the bus clock is >4.8 MHz. The Cirrus
SoundWire peripheral IP exposes the bridge-to-bus read buffer
and status bits. For a read from OTP the bridge status bits are
polled to wait for the OTP data to be loaded into the read buffer
and the data is then read from there.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Link: https://patch.msgid.link/20240805140839.26042-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/cs35l56.h
sound/soc/codecs/cs35l56-sdw.c