From 35d1cdafd9244081bd69a5dfa6b22e6e077e94c7 Mon Sep 17 00:00:00 2001 From: Veera Sundaram Sankaran Date: Thu, 17 Dec 2020 14:27:36 -0800 Subject: [PATCH] disp: msm: dsi: add stub function parse power_cfg in trusted-vm In trusted-vm, there are no power cfg entries in device-tree as there is no support. Add stub function to avoid parsing errors related to power cfg in trusted-vm. Change-Id: Id28ad9a4d5608d561e22b318a08c6bc1ccc5f2ee Signed-off-by: Veera Sundaram Sankaran --- msm/dsi/dsi_panel.c | 4 +++- msm/dsi/dsi_panel.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index f21eae125e99..e5de6bfd2272 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -3424,6 +3424,7 @@ static void dsi_panel_setup_vm_ops(struct dsi_panel *panel, bool trusted_vm_env) panel->panel_ops.bl_register = dsi_panel_vm_stub; panel->panel_ops.bl_unregister = dsi_panel_vm_stub; panel->panel_ops.parse_gpios = dsi_panel_vm_stub; + panel->panel_ops.parse_power_cfg = dsi_panel_vm_stub; } else { panel->panel_ops.pinctrl_init = dsi_panel_pinctrl_init; panel->panel_ops.gpio_request = dsi_panel_gpio_request; @@ -3432,6 +3433,7 @@ static void dsi_panel_setup_vm_ops(struct dsi_panel *panel, bool trusted_vm_env) panel->panel_ops.bl_register = dsi_panel_bl_register; panel->panel_ops.bl_unregister = dsi_panel_bl_unregister; panel->panel_ops.parse_gpios = dsi_panel_parse_gpios; + panel->panel_ops.parse_power_cfg = dsi_panel_parse_power_cfg; } } @@ -3518,7 +3520,7 @@ struct dsi_panel *dsi_panel_get(struct device *parent, goto error; } - rc = dsi_panel_parse_power_cfg(panel); + rc = panel->panel_ops.parse_power_cfg(panel); if (rc) DSI_ERR("failed to parse power config, rc=%d\n", rc); diff --git a/msm/dsi/dsi_panel.h b/msm/dsi/dsi_panel.h index 994b23fc8f26..b0c259dacce1 100644 --- a/msm/dsi/dsi_panel.h +++ b/msm/dsi/dsi_panel.h @@ -199,6 +199,7 @@ struct dsi_panel_ops { int (*bl_register)(struct dsi_panel *panel); int (*bl_unregister)(struct dsi_panel *panel); int (*parse_gpios)(struct dsi_panel *panel); + int (*parse_power_cfg)(struct dsi_panel *panel); }; struct dsi_panel {