• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __HIDEV_H__
20 #define __HIDEV_H__
21 
22 #include "hi_type.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 
28 #define HIDEV_DEVICE_NAME "hi_dev"
29 
30 enum {
31     HIDEV_PM_SUSPEND,
32     HIDEV_PM_RESUME,
33     HIDEV_PM_LOWPOWER_ENTER,
34     HIDEV_PM_LOWPOWER_EXIT,
35     HIDEV_PM_POWEROFF,
36     HIDEV_PM_CMD_MAX
37 };
38 
39 struct hidev_pm_cmd {
40     hi_u32 cmd;
41 };
42 
43 struct hidev_block_mem {
44     hi_ulong phys_addr;
45     hi_ulong size;
46 };
47 
48 #define HIDEV_GET_PM_CMD _IOR('P', 1, struct hidev_pm_cmd)
49 #define HIDEV_FREE_BLOCK_MEM _IOW('P', 2, struct hidev_block_mem)
50 
51 #ifdef __cplusplus
52 }
53 #endif /* __cplusplus */
54 
55 #endif
56