linux/drivers/devfreq
Javi Merino 5dcb4226bb BACKPORT: devfreq_cooling: pass a pointer to devfreq in the power model callbacks
When the devfreq cooling device was designed, it was an oversight not to
pass a pointer to the struct devfreq as the first parameters of the
callbacks.  The design patterns of the kernel suggest it for a good
reason.

By passing a pointer to struct devfreq, the driver can register one
function that works with multiple devices.  With the current
implementation, a driver that can work with multiple devices has to
create multiple copies of the same function with different parameters so
that each devfreq_cooling_device can use the appropriate one.  By
passing a pointer to struct devfreq, the driver can identify which
device it's referring to.

Change-Id: I384bf9aafd2391eccab2ca6a76e4e57f2740aa6b
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Ørjan Eide <orjan.eide@arm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 3aa5374376)
2018-01-04 09:22:34 +08:00
..
event PM / devfreq: event: add support for rk3328 dfi 2017-12-28 08:48:23 +08:00
exynos devfreq: exynos: drop owner assignment from platform_drivers 2014-10-20 16:20:27 +02:00
ddr_rk3368.c rk3368 ddr: add configure ddr timing function 2015-09-15 16:30:38 +08:00
devfreq-event.c PM / devfreq: event: Add devfreq_event class 2015-01-30 17:56:40 +09:00
devfreq.c PM / devfreq: add to show current load of device 2016-08-29 14:58:21 +08:00
governor_performance.c
governor_powersave.c
governor_simpleondemand.c PM / devfreq: cache the last call to get_dev_status() 2015-09-11 14:23:28 +09:00
governor_userspace.c
governor.h
Kconfig PM / devfreq: rk3399_dmc: rename driver and internals to rockchip 2017-04-07 11:49:08 +08:00
Makefile PM / devfreq: rk3399_dmc: rename driver and internals to rockchip 2017-04-07 11:49:08 +08:00
rockchip_dmc.c BACKPORT: devfreq_cooling: pass a pointer to devfreq in the power model callbacks 2018-01-04 09:22:34 +08:00
tegra-devfreq.c PM / devfreq: tegra: Update governor to use devfreq_update_stats() 2015-09-11 14:23:30 +09:00