spmi: pmic-arb: Make core resources acquiring a version operation
authorAbel Vesa <abel.vesa@linaro.org>
Tue, 7 May 2024 21:07:47 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2024 18:46:10 +0000 (19:46 +0100)
commit994ac434b7261ac2d89c65c7fa75fa697bfd7054
tree60ea8897b6df3f811c17245ac6f5f209bed1f9d9
parent8bc03763e15b6783fdf149677d89a84e935aea8c
spmi: pmic-arb: Make core resources acquiring a version operation

Rather than setting up the core, obsrv and chnls in probe by using
version specific conditionals, add a dedicated "get_core_resources"
version specific op and move the acquiring in there. Since there are
no current users of the second bus yet, drop the comment about why
devm_platform_ioremap_resource can't be used in case of "core",
as it is not applicable anymore.
Don't switch to devm_platform_ioremap_resource though as we need
to keep track of core size.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240417-spmi-multi-master-support-v10-5-5bc6d322e266@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240507210809.3479953-11-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi-pmic-arb.c