nel. https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.3.y 2017-05-05T07:54:45Z thermal: devfreq_cooling: add new interface for direct power read 2017-05-05T07:54:45Z Lukasz Luba lukasz.luba@arm.com 2017-05-04T11:34:32Z urn:sha1:2be83da85a64773efaa407639de81bd1377f880e This patch introduces a new interface for device drivers connected to devfreq_cooling in the thermal framework: get_real_power(). Some devices have more sophisticated methods (like power counters) to approximate the actual power that they use. In the previous implementation we had a pre-calculated power table which was then scaled by 'utilization' ('busy_time' and 'total_time' taken from devfreq 'last_status'). With this new interface the driver can provide more precise data regarding actual power to the thermal governor every time the power budget is calculated. We then use this value and calculate the real resource utilization scaling factor. Reviewed-by: Chris Diamand <chris.diamand@arm.com> Acked-by: Javi Merino <javi.merino@kernel.org> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> devfreq_cooling: pass a pointer to devfreq in the power model callbacks 2016-11-23T02:07:35Z Javi Merino javi.merino@arm.com 2016-09-15T14:44:23Z urn:sha1:3aa5374376746f20a27be8682be7f91c8b71d1d8 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. 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> devfreq_cooling: make the structs devfreq_cooling_xxx visible for all 2016-11-23T02:07:35Z Lukasz Luba lukasz.luba@arm.com 2016-09-15T14:44:22Z urn:sha1:1cea4e7776b7e9096b696eeb66364f51a8d321ec Currently the protection #ifdef CONFIG_DEVFREQ_THERMAL cuts the needed structures devfreq_cooling_ops and devfreq_cooling_device. The functions which are supposed to provide the empty implementation complain about unknown structures. Similar solution is present in include/linux/devfreq.h. Reviewed-by: Ørjan Eide <orjan.eide@arm.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister 2015-11-02T21:14:44Z Javi Merino javi.merino@arm.com 2015-11-02T19:03:03Z urn:sha1:3c99c2cef75eb5bfc05c5728e4560f3ee656d47e Be consistent with what other cooling devices do and return a struct thermal_cooling_device * on register. Also, for the unregister, accept a struct thermal_cooling_device * as parameter. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> thermal: Add devfreq cooling 2015-10-30T17:21:01Z Ørjan Eide orjan.eide@arm.com 2015-09-10T17:09:30Z urn:sha1:a76caf55e5b356ba20a5a43ac4d9f7a04b20941d Add a generic thermal cooling device for devfreq, that is similar to cpu_cooling. The device must use devfreq. In order to use the power extension of the cooling device, it must have registered its OPPs using the OPP library. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Ørjan Eide <orjan.eide@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>