From 4bb744430e69fff84c7d1e9c12775a289f2e10d6 Mon Sep 17 00:00:00 2001 From: Dhaval Patel Date: Fri, 6 Feb 2015 00:02:18 -0800 Subject: [PATCH] msm: mdss: update bist ctrl property as optional property bist ctrl property is optional for DSI 1.4. Handle it accordingly. Change-Id: Ic0d0a0c25626e44ab3840bb2d9f34affbed01cea Signed-off-by: Dhaval Patel --- .../devicetree/bindings/fb/mdss-dsi-ctrl.txt | 4 ++-- drivers/video/fbdev/msm/mdss_dsi.c | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt index b4294c17d7b1..c5c6e598af9e 100644 --- a/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt +++ b/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt @@ -22,8 +22,6 @@ Required properties: regulator settings. It use 5 bytes for thulium pll. - qcom,platform-strength-ctrl: An array of length 2 or 10 that specifies the PHY strengthCtrl settings. It use 10 bytes for thulium pll. -- qcom,platform-bist-ctrl: An array of length 6 that specifies the PHY - BIST ctrl settings. - qcom,platform-lane-config: An array of length 45 or 20 that specifies the PHY lane configuration settings. It use 20 bytes for thulium pll. - qcom,dsi-pref-prim-pan: phandle that specifies the primary panel to be used @@ -34,6 +32,8 @@ Optional properties: - reg-names: A list of strings that map in order to the list of regs. "dsi_phy_regulator" - MDSS DSI PHY REGULATOR region +- qcom,platform-bist-ctrl: An array of length 6 that specifies the PHY + BIST ctrl settings. - vcca-supply: Phandle for vcca regulator device node. - qcom,ctrl-supply-entries: A node that lists the elements of the supply used by the DSI controller and PHY. There can be more than one instance diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 2f43e834bfb9..aabdffb2a416 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -1842,15 +1842,12 @@ int dsi_panel_device_register(struct device_node *pan_node, data = of_get_property(ctrl_pdev->dev.of_node, "qcom,platform-bist-ctrl", &len); - if ((!data) || (len != 6)) { + if ((!data) || (len != 6)) pr_err("%s:%d, Unable to read Phy Bist Ctrl settings\n", __func__, __LINE__); - return -EINVAL; - } - - for (i = 0; i < len; i++) { - pinfo->mipi.dsi_phy_db.bistctrl[i] = data[i]; - } + else + for (i = 0; i < len; i++) + pinfo->mipi.dsi_phy_db.bistctrl[i] = data[i]; data = of_get_property(ctrl_pdev->dev.of_node, "qcom,platform-lane-config", &len);