summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dsi/dsi.h
diff options
context:
space:
mode:
authorHai Li <hali@codeaurora.org>2015-05-15 20:04:06 +0300
committerRob Clark <robdclark@gmail.com>2015-06-11 20:11:05 +0300
commitec31abf6684ebe1134eb3320c96fb92e566eff74 (patch)
tree14d254e9bab8f098451bb2b2a92aa8fffa196e5d /drivers/gpu/drm/msm/dsi/dsi.h
parent9d32c4989c858af12b333ae9a3c160a91ff43934 (diff)
downloadlinux-ec31abf6684ebe1134eb3320c96fb92e566eff74.tar.xz
drm/msm/dsi: Separate PHY to another platform device
There are different types of PHY from one chipset to another, while the DSI host controller is relatively consistent across platforms. Also, the PLL inside PHY is providing the source of DSI byte and pixel clocks, which are used by DSI host controller. Separated devices for clock provider and clock consumer make DSI driver better fit into common clock framework. Signed-off-by: Hai Li <hali@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi.h')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
index 8022814f7914..92d697de4858 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.h
+++ b/drivers/gpu/drm/msm/dsi/dsi.h
@@ -14,6 +14,7 @@
#ifndef __DSI_CONNECTOR_H__
#define __DSI_CONNECTOR_H__
+#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include "drm_crtc.h"
@@ -39,12 +40,27 @@
#define DSI_ENCODER_SLAVE DSI_0
enum msm_dsi_phy_type {
- MSM_DSI_PHY_UNKNOWN,
MSM_DSI_PHY_28NM_HPM,
MSM_DSI_PHY_28NM_LP,
MSM_DSI_PHY_MAX
};
+#define DSI_DEV_REGULATOR_MAX 8
+
+/* Regulators for DSI devices */
+struct dsi_reg_entry {
+ char name[32];
+ int min_voltage;
+ int max_voltage;
+ int enable_load;
+ int disable_load;
+};
+
+struct dsi_reg_config {
+ int num;
+ struct dsi_reg_entry regs[DSI_DEV_REGULATOR_MAX];
+};
+
struct msm_dsi {
struct drm_device *dev;
struct platform_device *pdev;
@@ -57,7 +73,7 @@ struct msm_dsi {
struct drm_panel *panel;
unsigned long panel_flags;
- enum msm_dsi_phy_type phy_type;
+ struct device *phy_dev;
bool phy_enabled;
/* the encoders we are hooked to (outside of dsi block) */
@@ -135,9 +151,8 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi);
/* dsi phy */
struct msm_dsi_phy;
-struct msm_dsi_phy *msm_dsi_phy_init(struct platform_device *pdev,
- enum msm_dsi_phy_type type, int id);
-void msm_dsi_phy_destroy(struct msm_dsi_phy *phy);
+void msm_dsi_phy_driver_register(void);
+void msm_dsi_phy_driver_unregister(void);
int msm_dsi_phy_enable(struct msm_dsi_phy *phy, bool is_dual_panel,
const unsigned long bit_rate, const unsigned long esc_rate);
int msm_dsi_phy_disable(struct msm_dsi_phy *phy);