Line data Source code
1 0 : /*
2 : * Copyright (c) 2025 Analog Devices, Inc.
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 :
7 : #ifndef ZEPHYR_SUBSYS_CPU_FREQ_H_
8 : #define ZEPHYR_SUBSYS_CPU_FREQ_H_
9 :
10 : #ifdef __cplusplus
11 : extern "C" {
12 : #endif
13 :
14 : #include <zephyr/types.h>
15 : #include <zephyr/cpu_freq/pstate.h>
16 :
17 : /**
18 : * @brief Dynamic CPU Frequency Scaling
19 : * @defgroup subsys_cpu_freq CPU Frequency (CPUFreq)
20 : * @since 4.3
21 : * @version 0.1.0
22 : * @ingroup os_services
23 : * @{
24 : */
25 :
26 : /**
27 : * @brief Request processor set the given performance state.
28 : *
29 : * To be implemented by the SoC. This API abstracts the hardware and SoC specific calls required to
30 : * change the performance state of the processor.
31 : *
32 : * @note It is not guaranteed that the performance state will be set immediately, or at all.
33 : *
34 : * @param state Pointer to performance state.
35 : *
36 : *
37 : * @retval 0 if request received successfully, -errno in case of failure.
38 : */
39 1 : int cpu_freq_pstate_set(const struct pstate *state);
40 :
41 : /**
42 : * @}
43 : */
44 :
45 : #ifdef __cplusplus
46 : }
47 : #endif
48 :
49 : #endif /* ZEPHYR_SUBSYS_CPU_FREQ_H_ */
|