1 /****************************************************************************
3 * Copyright (C) 2005 - 2014 by Vivante Corp.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the license, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *****************************************************************************/
24 #ifndef __gc_hal_kernel_debugfs_h_
25 #define __gc_hal_kernel_debugfs_h_
27 #define MAX_LINE_SIZE 768 /* Max bytes for a line of debug info */
30 typedef struct _gcsDEBUGFS_Node gcsDEBUGFS_Node;
32 typedef struct _gcsDEBUGFS_DIR *gckDEBUGFS_DIR;
33 typedef struct _gcsDEBUGFS_DIR
36 struct list_head nodeList;
40 typedef struct _gcsINFO
43 int (*show)(struct seq_file*, void*);
47 typedef struct _gcsINFO_NODE
51 struct dentry * entry;
52 struct list_head head;
58 IN gckDEBUGFS_DIR Dir,
59 IN struct dentry *root,
60 IN gctCONST_STRING Name
64 gckDEBUGFS_DIR_CreateFiles(
65 IN gckDEBUGFS_DIR Dir,
72 gckDEBUGFS_DIR_RemoveFiles(
73 IN gckDEBUGFS_DIR Dir,
79 gckDEBUGFS_DIR_Deinit(
83 /*******************************************************************************
87 *******************************************************************************/
89 gctINT gckDEBUGFS_IsEnabled(void);
91 gctINT gckDEBUGFS_Initialize(void);
93 gctINT gckDEBUGFS_Terminate(void);
96 /*******************************************************************************
100 *******************************************************************************/
103 gckDEBUGFS_CreateNode(
104 IN gctPOINTER Device,
106 IN struct dentry * Root,
107 IN gctCONST_STRING NodeName,
108 OUT gcsDEBUGFS_Node **Node
111 void gckDEBUGFS_FreeNode(
112 IN gcsDEBUGFS_Node * Node
117 void gckDEBUGFS_SetCurrentNode(
118 IN gcsDEBUGFS_Node * Node
123 void gckDEBUGFS_GetCurrentNode(
124 OUT gcsDEBUGFS_Node ** Node
128 ssize_t gckDEBUGFS_Print(
129 IN gctCONST_STRING Message,