Commit 166fd2aa authored by Peter Griffin's avatar Peter Griffin Committed by Greg Kroah-Hartman
Browse files

mfd: syscon: Add of_syscon_register_regmap() API



[ Upstream commit 769cb631 ]

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: default avatarPeter Griffin <peter.griffin@linaro.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
Tested-by: default avatarWill McVicker <willmcvicker@google.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240621115544.1655458-2-peter.griffin@linaro.org


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Stable-dep-of: 805f7aaf ("mfd: syscon: Fix race in device_node_get_regmap()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent dd955e42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment