]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regmap: sdw-mbq: Add support for SDCA deferred controls
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 7 Jan 2025 15:44:06 +0000 (15:44 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 7 Jan 2025 20:21:00 +0000 (20:21 +0000)
commit5bc493bf0c37c157bf2eb364e55a1c6f8bc43a69
tree2dafea3e18c4f96b4f6dd75d365e3b59be1ec21a
parentfdd9ef3dce98e035d21c17fac587cb6e3c7706fd
regmap: sdw-mbq: Add support for SDCA deferred controls

The SDCA specification allows for controls to be deferred. In the case
of a deferred control the device will return COMMAND_IGNORED to the
8-bit operation that would cause the value to commit. Which is the
final 8-bits on a write, or the first 8-bits on a read. In the case of
receiving a defer, the regmap will poll the SDCA function busy bit,
after which the transaction will be retried, returning an error if the
function busy does not clear within a chip specific timeout. Since
this is common SDCA functionality which is the 99% use-case for MBQs
it makes sense to incorporate this functionality into the register
map. If no MBQ configuration is specified, the behaviour will default
to the existing behaviour.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250107154408.814455-5-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-sdw-mbq.c
include/linux/regmap.h