2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00
linux-next/drivers/devfreq
Nishanth Menon 0779726cc2 PM / OPP: predictable fail results for opp_find* functions, v2
Currently the opp_find* functions return -ENODEV when:
a) it cant find a device (e.g. request for an OPP search on device
   which was not registered)
b) When it cant find a match for the search strategy used

This makes life a little in-efficient for users such as devfreq
to make reasonable judgement before switching search strategies.

So, standardize the return results as following:
 -EINVAL for bad pointer parameters
 -ENODEV when device cannot be found
 -ERANGE when search fails

This has the following benefit for devfreq implementation:
The search fails when an unregistered device pointer is provided.
This is a trigger to change the search direction and search for
a better fit, however, if we cannot differentiate between a valid
search range failure Vs an unregistered device, second search goes
through the same fail return condition. This can be avoided by
appropriate handling of error return code.

With this change, we also fix devfreq for the improved search
strategy with updated error code.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:36:10 +01:00
..
devfreq.c PM / OPP: predictable fail results for opp_find* functions, v2 2012-11-15 00:36:10 +01:00
exynos4_bus.c ARM: global cleanups 2012-03-27 16:03:32 -07:00
governor_performance.c PM: devfreq: init performance/powersave governor 2012-05-01 21:23:50 +02:00
governor_powersave.c PM: devfreq: init performance/powersave governor 2012-05-01 21:23:50 +02:00
governor_simpleondemand.c PM / devfreq: add min/max_freq limit requested by users. 2012-01-20 10:12:38 +09:00
governor_userspace.c PM / devfreq: add min/max_freq limit requested by users. 2012-01-20 10:12:38 +09:00
governor.h PM: Introduce devfreq: generic DVFS framework with device-specific OPPs 2011-10-02 00:19:15 +02:00
Kconfig Fix typo in various Kconfig file 2012-04-16 14:40:08 +02:00
Makefile PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412. 2011-12-20 14:08:08 +09:00