diff options
| author | Aravind Venkateswaran <aravindh@codeaurora.org> | 2016-03-30 14:59:56 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-04-18 17:06:22 -0700 |
| commit | 2ff913cbf016a337f2d6d63efc3986217ee413b9 (patch) | |
| tree | 1ac3c7715c8b1719b0de8813ed0bb85b90d5b269 | |
| parent | a302531f3e8b16229162c02c38a6748160a75d06 (diff) | |
msm: mdss: make DSI regulator settings an optional dt binding
Newer versions of the DSI phy do not require any programming of the lane
regulator settings. Make this binding an optional property for the DSI
device node.
CRs-Fixed: 1000724
Change-Id: I696aab348cdb04db4068b2b62bcd049c839cbc33
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/fb/mdss-dsi.txt | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/msm_mdss_io_8974.c | 11 |
3 files changed, 15 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi.txt b/Documentation/devicetree/bindings/fb/mdss-dsi.txt index e978646b54f4..50e12ccde14f 100644 --- a/Documentation/devicetree/bindings/fb/mdss-dsi.txt +++ b/Documentation/devicetree/bindings/fb/mdss-dsi.txt @@ -84,8 +84,6 @@ Required properties: - qcom,mdss-fb-map-prim: pHandle that specifies the framebuffer to which the primary interface is mapped. - qcom,mdss-mdp: pHandle that specifies the mdss-mdp device. -- qcom,platform-regulator-settings: An array of length 7 or 5 that specifies the PHY - regulator settings. It use 5 bytes for 8996 pll. - qcom,platform-strength-ctrl: An array of length 2 or 10 that specifies the PHY strengthCtrl settings. It use 10 bytes for 8996 pll. - qcom,platform-lane-config: An array of length 45 or 20 that specifies the PHY @@ -113,6 +111,8 @@ Optional properties: controller. These pin configurations are installed in the pinctrl device node. Refer to pinctrl-bindings.txt - qcom,regulator-ldo-mode: Boolean to enable ldo mode for the dsi phy regulator +- qcom,platform-regulator-settings: An array of length 7 or 5 that specifies the PHY + regulator settings. It use 5 bytes for 8996 pll. - qcom,null-insertion-enabled: Boolean to enable NULL packet insertion feature for DSI controller. - qcom,dsi-irq-line: Boolean specifies if DSI has a different irq line than mdp. diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 646f75653583..bb4114e90b6c 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -3748,9 +3748,9 @@ static int mdss_dsi_parse_ctrl_params(struct platform_device *ctrl_pdev, data = of_get_property(ctrl_pdev->dev.of_node, "qcom,platform-regulator-settings", &len); if (!data) { - pr_err("%s:%d, Unable to read Phy regulator settings\n", + pr_debug("%s:%d, Unable to read Phy regulator settings\n", __func__, __LINE__); - return -EINVAL; + pinfo->mipi.dsi_phy_db.regulator_len = 0; } else { pinfo->mipi.dsi_phy_db.regulator_len = len; for (i = 0; i < len; i++) diff --git a/drivers/video/fbdev/msm/msm_mdss_io_8974.c b/drivers/video/fbdev/msm/msm_mdss_io_8974.c index b23e24362af6..619c671650ea 100644 --- a/drivers/video/fbdev/msm/msm_mdss_io_8974.c +++ b/drivers/video/fbdev/msm/msm_mdss_io_8974.c @@ -564,6 +564,11 @@ static void mdss_dsi_28nm_phy_regulator_enable( struct mdss_dsi_phy_ctrl *pd; pd = &(((ctrl_pdata->panel_data).panel_info.mipi).dsi_phy_db); + if (pd->regulator_len == 0) { + pr_warn("%s: invalid regulator settings\n", __func__); + return; + } + if (pd->reg_ldo_mode) { /* Regulator ctrl 0 */ MIPI_OUTP(ctrl_pdata->phy_regulator_io.base, 0x0); @@ -855,6 +860,12 @@ static void mdss_dsi_8996_phy_regulator_enable( void __iomem *base; pd = &(((ctrl->panel_data).panel_info.mipi).dsi_phy_db); + + if (pd->regulator_len != 5) { + pr_warn("%s: invalid regulator settings\n", __func__); + return; + } + /* 4 lanes + clk lane configuration */ for (ln = 0; ln < 5; ln++) { /* |
