hc
2024-08-16 a24a44ff9ca902811b99aa9663d697cf452e08ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* SPDX-License-Identifier:     GPL-2.0+ */
/*
 * (C) Copyright 2018 Rockchip Electronics Co., Ltd
 */
 
#ifndef _DVFS_H_
#define _DVFS_H_
 
#include <dm.h>
 
/**
 * dvfs_init() - init first dvfs driver
 *
 * @apply: do dvfs policy apply if true, otherwise just init.
 * @return 0 if OK, 1 on error
 */
int dvfs_init(bool apply);
 
/**
 * dvfs_apply() - do dvfs policy apply
 *
 * @dev: dvfs device
 * @return 0 if OK, otherwise on error
 */
int dvfs_apply(struct udevice *dev);
 
/**
 * dvfs_repeat_apply() - do dvfs policy repeat apply
 *
 * @dev: dvfs device
 * @return 0 if OK, otherwise on error
 */
int dvfs_repeat_apply(struct udevice *dev);
 
/**
 * struct dm_dvfs_ops - Driver model Thermal operations
 *
 * The uclass interface is implemented by all Thermal devices which use
 * driver model.
 */
 
struct dm_dvfs_ops {
   int (*apply)(struct udevice *dev);
   int (*repeat_apply)(struct udevice *dev);
};
 
#endif    /* _DVFS_H_ */