xref: /OK3568_Linux_fs/kernel/include/soc/rockchip/rockchip-system-status.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2 /*
3  * Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
4  */
5 
6 #ifndef __SOC_ROCKCHIP_SYSTEM_STATUS_H
7 #define __SOC_ROCKCHIP_SYSTEM_STATUS_H
8 
9 #if IS_REACHABLE(CONFIG_ROCKCHIP_SYSTEM_MONITOR)
10 int rockchip_register_system_status_notifier(struct notifier_block *nb);
11 int rockchip_unregister_system_status_notifier(struct notifier_block *nb);
12 void rockchip_set_system_status(unsigned long status);
13 void rockchip_clear_system_status(unsigned long status);
14 unsigned long rockchip_get_system_status(void);
15 int rockchip_add_system_status_interface(struct device *dev);
16 void rockchip_update_system_status(const char *buf);
17 #else
18 static inline int
rockchip_register_system_status_notifier(struct notifier_block * nb)19 rockchip_register_system_status_notifier(struct notifier_block *nb)
20 {
21 	return -ENOTSUPP;
22 };
23 
24 static inline int
rockchip_unregister_system_status_notifier(struct notifier_block * nb)25 rockchip_unregister_system_status_notifier(struct notifier_block *nb)
26 {
27 	return -ENOTSUPP;
28 };
29 
rockchip_set_system_status(unsigned long status)30 static inline void rockchip_set_system_status(unsigned long status)
31 {
32 };
33 
rockchip_clear_system_status(unsigned long status)34 static inline void rockchip_clear_system_status(unsigned long status)
35 {
36 };
37 
rockchip_get_system_status(void)38 static inline unsigned long rockchip_get_system_status(void)
39 {
40 	return 0;
41 };
42 
rockchip_add_system_status_interface(struct device * dev)43 static inline int rockchip_add_system_status_interface(struct device *dev)
44 {
45 	return -ENOTSUPP;
46 };
47 
rockchip_update_system_status(const char * buf)48 static inline void rockchip_update_system_status(const char *buf)
49 {
50 };
51 #endif /* CONFIG_ROCKCHIP_SYSTEM_MONITOR */
52 
53 #endif
54