diff options
author | Olof Johansson <olof@lixom.net> | 2020-01-10 22:11:12 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2020-01-10 22:11:13 -0800 |
commit | dc64f487f4c4e7a03bfa0a7c0e8e6a49214373d0 (patch) | |
tree | 93b82518c1fea41980bf77927f5fa43d76ffb8f8 /drivers/soc | |
parent | 9f1c2cb3296a252bd84d56f80346369bd0d95387 (diff) | |
parent | 30388cc075720aa0af4f2cb5933afa1f8f39d313 (diff) |
Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes
arm-soc: Amlogic fixes for v5.5-rc
* tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
arm64: dts: meson-sm1-sei610: add gpio bluetooth interrupt
dt-bindings: reset: meson8b: fix duplicate reset IDs
soc: amlogic: meson-ee-pwrc: propagate errors from pm_genpd_init()
soc: amlogic: meson-ee-pwrc: propagate PD provider registration errors
ARM: dts: meson8: fix the size of the PMU registers
arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs
Link: https://lore.kernel.org/r/7hmuaweavi.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/amlogic/meson-ee-pwrc.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c index 5823f5b67d16..3f0261d53ad9 100644 --- a/drivers/soc/amlogic/meson-ee-pwrc.c +++ b/drivers/soc/amlogic/meson-ee-pwrc.c @@ -323,6 +323,8 @@ static int meson_ee_pwrc_init_domain(struct platform_device *pdev, struct meson_ee_pwrc *pwrc, struct meson_ee_pwrc_domain *dom) { + int ret; + dom->pwrc = pwrc; dom->num_rstc = dom->desc.reset_names_count; dom->num_clks = dom->desc.clk_names_count; @@ -368,15 +370,21 @@ static int meson_ee_pwrc_init_domain(struct platform_device *pdev, * prepare/enable counters won't be in sync. */ if (dom->num_clks && dom->desc.get_power && !dom->desc.get_power(dom)) { - int ret = clk_bulk_prepare_enable(dom->num_clks, dom->clks); + ret = clk_bulk_prepare_enable(dom->num_clks, dom->clks); if (ret) return ret; - pm_genpd_init(&dom->base, &pm_domain_always_on_gov, false); - } else - pm_genpd_init(&dom->base, NULL, - (dom->desc.get_power ? - dom->desc.get_power(dom) : true)); + ret = pm_genpd_init(&dom->base, &pm_domain_always_on_gov, + false); + if (ret) + return ret; + } else { + ret = pm_genpd_init(&dom->base, NULL, + (dom->desc.get_power ? + dom->desc.get_power(dom) : true)); + if (ret) + return ret; + } return 0; } @@ -441,9 +449,7 @@ static int meson_ee_pwrc_probe(struct platform_device *pdev) pwrc->xlate.domains[i] = &dom->base; } - of_genpd_add_provider_onecell(pdev->dev.of_node, &pwrc->xlate); - - return 0; + return of_genpd_add_provider_onecell(pdev->dev.of_node, &pwrc->xlate); } static void meson_ee_pwrc_shutdown(struct platform_device *pdev) |