blob: fb88e23a99d3d97d77cfbf81def3c662208a8b7e [file] [log] [blame]
Daniel Lezcano88763a52018-06-26 12:53:29 +02001/* 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 */
12struct idle_inject_device;
13
14struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);
15
16void idle_inject_unregister(struct idle_inject_device *ii_dev);
17
18int idle_inject_start(struct idle_inject_device *ii_dev);
19
20void idle_inject_stop(struct idle_inject_device *ii_dev);
21
22void idle_inject_set_duration(struct idle_inject_device *ii_dev,
Daniel Lezcanocd4c0762019-08-02 19:34:24 +020023 unsigned int run_duration_us,
24 unsigned int idle_duration_us);
Daniel Lezcano88763a52018-06-26 12:53:29 +020025
26void idle_inject_get_duration(struct idle_inject_device *ii_dev,
Daniel Lezcanocd4c0762019-08-02 19:34:24 +020027 unsigned int *run_duration_us,
28 unsigned int *idle_duration_us);
Daniel Lezcano333cff6c2020-04-29 12:36:39 +020029
30void idle_inject_set_latency(struct idle_inject_device *ii_dev,
zhuguangqing585834a2020-09-17 15:35:53 +080031 unsigned int latency_us);
Daniel Lezcano333cff6c2020-04-29 12:36:39 +020032
Daniel Lezcano88763a52018-06-26 12:53:29 +020033#endif /* __IDLE_INJECT_H__ */