mali_kbase_power_model_simple.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. *
  3. * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.
  4. *
  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
  8. * of such GNU licence.
  9. *
  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.
  13. *
  14. */
  15. #ifndef _BASE_POWER_MODEL_SIMPLE_H_
  16. #define _BASE_POWER_MODEL_SIMPLE_H_
  17. /**
  18. * kbase_power_model_simple_init - Initialise the simple power model
  19. * @kbdev: Device pointer
  20. *
  21. * The simple power model estimates power based on current voltage, temperature,
  22. * and coefficients read from device tree. It does not take utilization into
  23. * account.
  24. *
  25. * The power model requires coefficients from the power_model node in device
  26. * tree. The absence of this node will prevent the model from functioning, but
  27. * should not prevent the rest of the driver from running.
  28. *
  29. * Return: 0 on success
  30. * -ENOSYS if the power_model node is not present in device tree
  31. * -EPROBE_DEFER if the thermal zone specified in device tree is not
  32. * currently available
  33. * Any other negative value on failure
  34. */
  35. int kbase_power_model_simple_init(struct kbase_device *kbdev);
  36. extern struct devfreq_cooling_ops power_model_simple_ops;
  37. #endif // ifndef _BASE_POWER_MODEL_SIMPLE_H_