From 85c675d0d09a45a135bddd15d7b385f8758c32fb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:35:05 +0200 Subject: Adding upstream version 6.7.7. Signed-off-by: Daniel Baumann --- drivers/pmdomain/rockchip/Kconfig | 16 ++++++++++++++++ drivers/pmdomain/rockchip/pm-domains.c | 13 ++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 drivers/pmdomain/rockchip/Kconfig (limited to 'drivers/pmdomain/rockchip') diff --git a/drivers/pmdomain/rockchip/Kconfig b/drivers/pmdomain/rockchip/Kconfig new file mode 100644 index 0000000000..b0d70f1a84 --- /dev/null +++ b/drivers/pmdomain/rockchip/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-only +if ARCH_ROCKCHIP || COMPILE_TEST + +config ROCKCHIP_PM_DOMAINS + bool "Rockchip generic power domain" + depends on PM + select PM_GENERIC_DOMAINS + help + Say y here to enable power domain support. + In order to meet high performance and low power requirements, a power + management unit is designed or saving power when RK3288 in low power + mode. The RK3288 PMU is dedicated for managing the power of the whole chip. + + If unsure, say N. + +endif diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c index d5d3ecb382..9b76b62869 100644 --- a/drivers/pmdomain/rockchip/pm-domains.c +++ b/drivers/pmdomain/rockchip/pm-domains.c @@ -9,11 +9,13 @@ #include #include #include +#include #include #include +#include +#include #include #include -#include #include #include #include @@ -857,7 +859,6 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev) struct device_node *node; struct device *parent; struct rockchip_pmu *pmu; - const struct of_device_id *match; const struct rockchip_pmu_info *pmu_info; int error; @@ -866,13 +867,7 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev) return -ENODEV; } - match = of_match_device(dev->driver->of_match_table, dev); - if (!match || !match->data) { - dev_err(dev, "missing pmu data\n"); - return -EINVAL; - } - - pmu_info = match->data; + pmu_info = device_get_match_data(dev); pmu = devm_kzalloc(dev, struct_size(pmu, domains, pmu_info->num_domains), -- cgit v1.2.3