Daniel Lezcano | 88763a5 | 2018-06-26 12:53:29 +0200 | [diff] [blame] | 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 | |
| 11 | /* private idle injection device structure */ |
| 12 | struct idle_inject_device; |
| 13 | |
| 14 | struct idle_inject_device *idle_inject_register(struct cpumask *cpumask); |
| 15 | |
| 16 | void idle_inject_unregister(struct idle_inject_device *ii_dev); |
| 17 | |
| 18 | int idle_inject_start(struct idle_inject_device *ii_dev); |
| 19 | |
| 20 | void idle_inject_stop(struct idle_inject_device *ii_dev); |
| 21 | |
| 22 | void idle_inject_set_duration(struct idle_inject_device *ii_dev, |
Daniel Lezcano | cd4c076 | 2019-08-02 19:34:24 +0200 | [diff] [blame] | 23 | unsigned int run_duration_us, |
| 24 | unsigned int idle_duration_us); |
Daniel Lezcano | 88763a5 | 2018-06-26 12:53:29 +0200 | [diff] [blame] | 25 | |
| 26 | void idle_inject_get_duration(struct idle_inject_device *ii_dev, |
Daniel Lezcano | cd4c076 | 2019-08-02 19:34:24 +0200 | [diff] [blame] | 27 | unsigned int *run_duration_us, |
| 28 | unsigned int *idle_duration_us); |
Daniel Lezcano | 333cff6c | 2020-04-29 12:36:39 +0200 | [diff] [blame] | 29 | |
| 30 | void idle_inject_set_latency(struct idle_inject_device *ii_dev, |
zhuguangqing | 585834a | 2020-09-17 15:35:53 +0800 | [diff] [blame] | 31 | unsigned int latency_us); |
Daniel Lezcano | 333cff6c | 2020-04-29 12:36:39 +0200 | [diff] [blame] | 32 | |
Daniel Lezcano | 88763a5 | 2018-06-26 12:53:29 +0200 | [diff] [blame] | 33 | #endif /* __IDLE_INJECT_H__ */ |