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