hc
2023-11-20 520ec20d74dfd87f62fd58b921b7209d6daed94a
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
48
49
50
51
52
53
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
 * Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
 */
 
#ifndef __SOC_ROCKCHIP_SYSTEM_STATUS_H
#define __SOC_ROCKCHIP_SYSTEM_STATUS_H
 
#if IS_ENABLED(CONFIG_ROCKCHIP_SYSTEM_MONITOR)
int rockchip_register_system_status_notifier(struct notifier_block *nb);
int rockchip_unregister_system_status_notifier(struct notifier_block *nb);
void rockchip_set_system_status(unsigned long status);
void rockchip_clear_system_status(unsigned long status);
unsigned long rockchip_get_system_status(void);
int rockchip_add_system_status_interface(struct device *dev);
void rockchip_update_system_status(const char *buf);
#else
static inline int
rockchip_register_system_status_notifier(struct notifier_block *nb)
{
   return -ENOTSUPP;
};
 
static inline int
rockchip_unregister_system_status_notifier(struct notifier_block *nb)
{
   return -ENOTSUPP;
};
 
static inline void rockchip_set_system_status(unsigned long status)
{
};
 
static inline void rockchip_clear_system_status(unsigned long status)
{
};
 
static inline unsigned long rockchip_get_system_status(void)
{
   return 0;
};
 
static inline int rockchip_add_system_status_interface(struct device *dev)
{
   return -ENOTSUPP;
};
 
static inline void rockchip_update_system_status(const char *buf)
{
};
#endif /* CONFIG_ROCKCHIP_SYSTEM_MONITOR */
 
#endif