Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2018 Linaro Ltd
0004  *
0005  * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
0006  *
0007  */
0008 #ifndef __IDLE_INJECT_H__
0009 #define __IDLE_INJECT_H__
0010 
0011 /* private idle injection device structure */
0012 struct idle_inject_device;
0013 
0014 struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);
0015 
0016 void idle_inject_unregister(struct idle_inject_device *ii_dev);
0017 
0018 int idle_inject_start(struct idle_inject_device *ii_dev);
0019 
0020 void idle_inject_stop(struct idle_inject_device *ii_dev);
0021 
0022 void idle_inject_set_duration(struct idle_inject_device *ii_dev,
0023                  unsigned int run_duration_us,
0024                  unsigned int idle_duration_us);
0025 
0026 void idle_inject_get_duration(struct idle_inject_device *ii_dev,
0027                  unsigned int *run_duration_us,
0028                  unsigned int *idle_duration_us);
0029 
0030 void idle_inject_set_latency(struct idle_inject_device *ii_dev,
0031                  unsigned int latency_us);
0032 
0033 #endif /* __IDLE_INJECT_H__ */