idle_inject.h 932 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2018 Linaro Ltd
  4. *
  5. * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
  6. *
  7. */
  8. #ifndef __IDLE_INJECT_H__
  9. #define __IDLE_INJECT_H__
  10. /* private idle injection device structure */
  11. struct idle_inject_device;
  12. struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);
  13. void idle_inject_unregister(struct idle_inject_device *ii_dev);
  14. int idle_inject_start(struct idle_inject_device *ii_dev);
  15. void idle_inject_stop(struct idle_inject_device *ii_dev);
  16. void idle_inject_set_duration(struct idle_inject_device *ii_dev,
  17. unsigned int run_duration_us,
  18. unsigned int idle_duration_us);
  19. void idle_inject_get_duration(struct idle_inject_device *ii_dev,
  20. unsigned int *run_duration_us,
  21. unsigned int *idle_duration_us);
  22. void idle_inject_set_latency(struct idle_inject_device *ii_dev,
  23. unsigned int latency_us);
  24. #endif /* __IDLE_INJECT_H__ */