]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regcache: Add support for sorting defaults arrays
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 17 Feb 2025 14:01:56 +0000 (14:01 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 27 Feb 2025 13:09:11 +0000 (13:09 +0000)
commitfd80df352ba1884ce2b62dd8d9495582308101b7
tree291153cd0edccffdb208dc974b479c0f228841c2
parenta54a659f5cc25e3b23ab19af08d0b23488bd9f4e
regcache: Add support for sorting defaults arrays

The defaults array in regcache must be sorted into ascending register
address order, because binary search is used to locate values in
the array. Add a helper to sort the register defaults array which
can be useful for systems that dynamically create a defaults array
based on external information.

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