]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mfd: syscon: Add of_syscon_register_regmap() API
authorPeter Griffin <peter.griffin@linaro.org>
Fri, 21 Jun 2024 11:55:43 +0000 (12:55 +0100)
committerLee Jones <lee@kernel.org>
Wed, 26 Jun 2024 15:46:50 +0000 (16:46 +0100)
commit769cb63166d90f1fadafa4352f180cbd96b6cb77
treeab4f065ca8c6cfb0de93f13625782bf7f56989f2
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
mfd: syscon: Add of_syscon_register_regmap() API

The of_syscon_register_regmap() API allows an externally created regmap
to be registered with syscon. This regmap can then be returned to client
drivers using the syscon_regmap_lookup_by_phandle() APIs.

The API is used by platforms where mmio access to the syscon registers is
not possible, and a underlying soc driver like exynos-pmu provides a SoC
specific regmap that can issue a SMC or hypervisor call to write the
register.

This approach keeps the SoC complexities out of syscon, but allows common
drivers such as  syscon-poweroff, syscon-reboot and friends that are used
by many SoCs already to be re-used.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Will McVicker <willmcvicker@google.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240621115544.1655458-2-peter.griffin@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/syscon.c
include/linux/mfd/syscon.h