drm/panel-edp: Add BOE NV140FHM-NZ panel entry
[drm/drm-misc.git] / kernel / trace / rv / rv.h
blobdb6cb0913dbd5bc809c228c6e8a3aafbce7b053b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/mutex.h>
4 struct rv_interface {
5 struct dentry *root_dir;
6 struct dentry *monitors_dir;
7 };
9 #include "../trace.h"
10 #include <linux/tracefs.h>
11 #include <linux/rv.h>
13 #define RV_MODE_WRITE TRACE_MODE_WRITE
14 #define RV_MODE_READ TRACE_MODE_READ
16 #define rv_create_dir tracefs_create_dir
17 #define rv_create_file tracefs_create_file
18 #define rv_remove tracefs_remove
20 #define MAX_RV_MONITOR_NAME_SIZE 32
21 #define MAX_RV_REACTOR_NAME_SIZE 32
23 extern struct mutex rv_interface_lock;
25 #ifdef CONFIG_RV_REACTORS
26 struct rv_reactor_def {
27 struct list_head list;
28 struct rv_reactor *reactor;
29 /* protected by the monitor interface lock */
30 int counter;
32 #endif
34 struct rv_monitor_def {
35 struct list_head list;
36 struct rv_monitor *monitor;
37 struct dentry *root_d;
38 #ifdef CONFIG_RV_REACTORS
39 struct rv_reactor_def *rdef;
40 bool reacting;
41 #endif
42 bool task_monitor;
45 struct dentry *get_monitors_root(void);
46 int rv_disable_monitor(struct rv_monitor_def *mdef);
47 int rv_enable_monitor(struct rv_monitor_def *mdef);
49 #ifdef CONFIG_RV_REACTORS
50 int reactor_populate_monitor(struct rv_monitor_def *mdef);
51 void reactor_cleanup_monitor(struct rv_monitor_def *mdef);
52 int init_rv_reactors(struct dentry *root_dir);
53 #else
54 static inline int reactor_populate_monitor(struct rv_monitor_def *mdef)
56 return 0;
59 static inline void reactor_cleanup_monitor(struct rv_monitor_def *mdef)
61 return;
64 static inline int init_rv_reactors(struct dentry *root_dir)
66 return 0;
68 #endif