]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:22 +0000 (15:34 +0200)
commit8237f7e436045ffd3c6e8172ba4e0ec43dbf81f4
tree12568c96557fa960b61544175347fcc254a810ed
parente5421a8b407b6e1ccb98acd715c50819ede66c02
ASoC: cs35l56: Handle OTP read latency over SoundWire

[ Upstream commit e42066df07c0fcedebb32ed56f8bc39b4bf86337 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/sound/cs35l56.h
sound/soc/codecs/cs35l56-sdw.c