3 * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * A copy of the licence is included with the program, and can also be obtained
11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12 * Boston, MA 02110-1301, USA.
18 #ifndef _BASE_POWER_MODEL_SIMPLE_H_
19 #define _BASE_POWER_MODEL_SIMPLE_H_
22 * kbase_power_model_simple_init - Initialise the simple power model
23 * @kbdev: Device pointer
25 * The simple power model estimates power based on current voltage, temperature,
26 * and coefficients read from device tree. It does not take utilization into
29 * The power model requires coefficients from the power_model node in device
30 * tree. The absence of this node will prevent the model from functioning, but
31 * should not prevent the rest of the driver from running.
33 * Return: 0 on success
34 * -ENOSYS if the power_model node is not present in device tree
35 * -EPROBE_DEFER if the thermal zone specified in device tree is not
37 * Any other negative value on failure
39 int kbase_power_model_simple_init(struct kbase_device *kbdev);
41 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
42 extern struct devfreq_cooling_ops power_model_simple_ops;
44 extern struct devfreq_cooling_power power_model_simple_ops;
47 #endif /* _BASE_POWER_MODEL_SIMPLE_H_ */