• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 __UMAPDRV_PROC_H__
20 #define __UMAPDRV_PROC_H__
21 
22 #include "hi_type.h"
23 #include "hi_osal.h"
24 
25 #define HIFB_ENTRY_NAME_RANGE 32
26 
27 typedef hi_s32 (*hifb_proc_show)(struct osal_proc_dir_entry *entry);
28 
29 typedef hi_s32 (*hifb_proc_write)(struct osal_proc_dir_entry *entry, const char *buf, int count, long long *);
30 
31 typedef hi_s32 (*hifb_proc_ioctl)(unsigned int cmd, unsigned long arg, hi_u32 *private_data);
32 
33 typedef struct {
34     hi_char entry_name[HIFB_ENTRY_NAME_RANGE];
35     struct osal_proc_dir_entry *entry;
36     hifb_proc_show show;
37     hifb_proc_write write;
38     hifb_proc_ioctl ioctl;
39     hi_void *data;
40 } hifb_proc_item;
41 
42 hi_void hifb_proc_add_module(const hi_char *, hi_u32, hifb_proc_show, hifb_proc_write, hi_void *);
43 hi_void hifb_proc_remove_module(const hi_char *);
44 hi_void hifb_proc_remove_all_module(hi_void);
45 
46 hi_void hifb_proc_init(hi_void);
47 
48 #endif /* __UMAPDRV_PROC_H__ */
49