linux/drivers/cpuidle
Ulf Hansson 1399ce344e cpuidle: dt: Return the correct numbers of parsed idle states
[ Upstream commit ee3c2c8ad6 ]

While we correctly skips to initialize an idle state from a disabled idle
state node in DT, the returned value from dt_init_idle_driver() don't get
adjusted accordingly. Instead the number of found idle state nodes are
returned, while the callers are expecting the number of successfully
initialized idle states from DT.

This leads to cpuidle drivers unnecessarily continues to initialize their
idle state specific data. Moreover, in the case when all idle states have
been disabled in DT, we would end up registering a cpuidle driver, rather
than relying on the default arch specific idle call.

Fixes: 9f14da3455 ("drivers: cpuidle: implement DT based idle states infrastructure")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:40:53 +01:00
..
governors cpuidle: teo: Avoid using "early hits" incorrectly 2020-02-05 21:22:52 +00:00
coupled.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
cpuidle-arm.c ARM: cpuidle: Remove overzealous error logging 2019-08-09 17:51:39 +01:00
cpuidle-at91.c
cpuidle-big_little.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpuidle-calxeda.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
cpuidle-clps711x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cpuidle-cps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cpuidle-exynos.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpuidle-haltpoll.c cpuidle: haltpoll: Take 'idle=' override into account 2019-10-22 11:43:17 +02:00
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c
cpuidle-psci.c PSCI: cpuidle: Refactor CPU suspend power_state parameter handling 2019-08-09 17:51:39 +01:00
cpuidle-pseries.c
cpuidle-ux500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpuidle-zynq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
cpuidle.c cpuidle: Fixup IRQ state 2020-09-09 19:12:21 +02:00
cpuidle.h cpuidle: allow governor switch on cpuidle_register_driver() 2019-09-11 17:36:30 +02:00
driver.c cpuidle: Do not unset the driver if it is there already 2019-12-17 19:56:20 +01:00
dt_idle_states.c cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:40:53 +01:00
dt_idle_states.h
governor.c cpuidle: allow governor switch on cpuidle_register_driver() 2019-09-11 17:36:30 +02:00
Kconfig cpuidle: add haltpoll governor 2019-07-30 17:27:37 +02:00
Kconfig.arm ARM: psci: cpuidle: Enable PSCI CPUidle driver 2019-08-09 17:51:39 +01:00
Kconfig.mips
Kconfig.powerpc
Makefile Power management updates for 5.4-rc1 2019-09-17 19:15:14 -07:00
poll_state.c cpuidle: add poll_limit_ns to cpuidle_device structure 2019-07-30 17:27:37 +02:00
sysfs.c cpuidle: Fix kobject memory leaks in error paths 2021-11-17 09:48:36 +01:00