-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings/soc/rockchip-system-status.h and soc/rockchip/rockchip-system-status.h
- Loading branch information
Showing
2 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* | ||
* Copyright (C) 2017 ROCKCHIP, Inc. | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#ifndef _DT_BINDINGS_SOC_ROCKCHIP_SYSTEM_STATUS_H | ||
#define _DT_BINDINGS_SOC_ROCKCHIP_SYSTEM_STATUS_H | ||
|
||
#define SYS_STATUS_NORMAL (1 << 0) | ||
#define SYS_STATUS_SUSPEND (1 << 1) | ||
#define SYS_STATUS_IDLE (1 << 2) | ||
#define SYS_STATUS_REBOOT (1 << 3) | ||
#define SYS_STATUS_VIDEO_4K (1 << 4) | ||
#define SYS_STATUS_VIDEO_1080P (1 << 5) | ||
#define SYS_STATUS_GPU (1 << 6) | ||
#define SYS_STATUS_RGA (1 << 7) | ||
#define SYS_STATUS_CIF0 (1 << 8) | ||
#define SYS_STATUS_CIF1 (1 << 9) | ||
#define SYS_STATUS_LCDC0 (1 << 10) | ||
#define SYS_STATUS_LCDC1 (1 << 11) | ||
#define SYS_STATUS_BOOST (1 << 12) | ||
#define SYS_STATUS_PERFORMANCE (1 << 13) | ||
#define SYS_STATUS_ISP (1 << 14) | ||
#define SYS_STATUS_HDMI (1 << 15) | ||
#define SYS_STATUS_VIDEO_4K_10B (1 << 16) | ||
#define SYS_STATUS_LOW_POWER (1 << 17) | ||
|
||
#define SYS_STATUS_VIDEO (SYS_STATUS_VIDEO_4K | \ | ||
SYS_STATUS_VIDEO_1080P | \ | ||
SYS_STATUS_VIDEO_4K_10B) | ||
#define SYS_STATUS_DUALVIEW (SYS_STATUS_LCDC0 | SYS_STATUS_LCDC1) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |