drm/rockchip: analogix_dp: Add support for RK3368 eDP
[firefly-linux-kernel-4.4.55.git] / include / drm / bridge / analogix_dp.h
1 /*
2  * Analogix DP (Display Port) Core interface driver.
3  *
4  * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation; either version 2 of the License, or (at your
9  * option) any later version.
10  */
11 #ifndef _ANALOGIX_DP_H_
12 #define _ANALOGIX_DP_H_
13
14 #include <drm/drm_crtc.h>
15
16 enum analogix_dp_devtype {
17         EXYNOS_DP,
18         ROCKCHIP_DP,
19 };
20
21 enum analogix_dp_sub_devtype {
22         RK3288_DP,
23         RK3368_EDP,
24         RK3399_EDP,
25 };
26
27 struct analogix_dp_plat_data {
28         enum analogix_dp_devtype dev_type;
29         enum analogix_dp_sub_devtype subdev_type;
30         struct drm_panel *panel;
31         struct drm_encoder *encoder;
32         struct drm_connector *connector;
33
34         int (*power_on)(struct analogix_dp_plat_data *);
35         int (*power_off)(struct analogix_dp_plat_data *);
36         int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
37                       struct drm_connector *);
38         int (*get_modes)(struct analogix_dp_plat_data *,
39                          struct drm_connector *);
40 };
41
42 int analogix_dp_resume(struct device *dev);
43 int analogix_dp_suspend(struct device *dev);
44
45 int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
46                      struct analogix_dp_plat_data *plat_data);
47 void analogix_dp_unbind(struct device *dev, struct device *master, void *data);
48
49 #endif /* _ANALOGIX_DP_H_ */