1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
4 */
5
6 #ifndef _DP_DEBUG_H_
7 #define _DP_DEBUG_H_
8
9 #include "dp_panel.h"
10 #include "dp_link.h"
11
12 #if defined(CONFIG_DEBUG_FS)
13
14 /**
15 * dp_debug_get() - configure and get the DisplayPlot debug module data
16 *
17 * @dev: device instance of the caller
18 * @panel: instance of panel module
19 * @link: instance of link module
20 * @connector: double pointer to display connector
21 * @root: connector's debugfs root
22 * @is_edp: set for eDP connectors / panels
23 * return: pointer to allocated debug module data
24 *
25 * This function sets up the debug module and provides a way
26 * for debugfs input to be communicated with existing modules
27 */
28 int dp_debug_init(struct device *dev, struct dp_panel *panel,
29 struct dp_link *link,
30 struct drm_connector *connector,
31 struct dentry *root,
32 bool is_edp);
33
34 #else
35
36 static inline
dp_debug_init(struct device * dev,struct dp_panel * panel,struct dp_link * link,struct drm_connector * connector,struct dentry * root,bool is_edp)37 int dp_debug_init(struct device *dev, struct dp_panel *panel,
38 struct dp_link *link,
39 struct drm_connector *connector,
40 struct dentry *root,
41 bool is_edp)
42 {
43 return -EINVAL;
44 }
45
46 #endif /* defined(CONFIG_DEBUG_FS) */
47
48 #endif /* _DP_DEBUG_H_ */
49