Linux 6.10-rc4
[linux-block.git] / include / linux / idle_inject.h
CommitLineData
88763a5c
DL
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 */
12struct idle_inject_device;
13
14struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);
15
acbc6610
SP
16struct idle_inject_device *idle_inject_register_full(struct cpumask *cpumask,
17 bool (*update)(void));
18
88763a5c
DL
19void idle_inject_unregister(struct idle_inject_device *ii_dev);
20
21int idle_inject_start(struct idle_inject_device *ii_dev);
22
23void idle_inject_stop(struct idle_inject_device *ii_dev);
24
25void idle_inject_set_duration(struct idle_inject_device *ii_dev,
cd4c0763
DL
26 unsigned int run_duration_us,
27 unsigned int idle_duration_us);
88763a5c
DL
28
29void idle_inject_get_duration(struct idle_inject_device *ii_dev,
cd4c0763
DL
30 unsigned int *run_duration_us,
31 unsigned int *idle_duration_us);
333cff6c
DL
32
33void idle_inject_set_latency(struct idle_inject_device *ii_dev,
585834a5 34 unsigned int latency_us);
333cff6c 35
88763a5c 36#endif /* __IDLE_INJECT_H__ */