drm/msm/hdmi: rename hpd_clks to pwr_clks
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 5 May 2025 00:14:54 +0000 (03:14 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Mon, 12 May 2025 16:18:48 +0000 (19:18 +0300)
As these clocks are now used in the runtime PM callbacks, they have no
connection to 'HPD'. Rename corresponding fields to follow clocks
purpose, to power up the HDMI controller.

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/651720/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-10-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/msm/hdmi/hdmi.c
drivers/gpu/drm/msm/hdmi/hdmi.h

index ded20176aa805db98b0599e617eb6ea9bce122d8..8e6e3e6a04bd2d86bcbd23c110f3533f56c17887 100644 (file)
@@ -226,19 +226,19 @@ fail:
        .item ## _cnt   = ARRAY_SIZE(item ## _names_ ## entry)
 
 static const char * const pwr_reg_names_8960[] = {"core-vdda"};
-static const char * const hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
+static const char * const pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
 
 static const struct hdmi_platform_config hdmi_tx_8960_config = {
                HDMI_CFG(pwr_reg, 8960),
-               HDMI_CFG(hpd_clk, 8960),
+               HDMI_CFG(pwr_clk, 8960),
 };
 
 static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"};
-static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
+static const char * const pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
 
 static const struct hdmi_platform_config hdmi_tx_8974_config = {
                HDMI_CFG(pwr_reg, 8x74),
-               HDMI_CFG(hpd_clk, 8x74),
+               HDMI_CFG(pwr_clk, 8x74),
 };
 
 static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)
@@ -333,17 +333,17 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev)
        if (ret)
                return dev_err_probe(dev, ret, "failed to get pwr regulators\n");
 
-       hdmi->hpd_clks = devm_kcalloc(&pdev->dev,
-                                     config->hpd_clk_cnt,
-                                     sizeof(hdmi->hpd_clks[0]),
+       hdmi->pwr_clks = devm_kcalloc(&pdev->dev,
+                                     config->pwr_clk_cnt,
+                                     sizeof(hdmi->pwr_clks[0]),
                                      GFP_KERNEL);
-       if (!hdmi->hpd_clks)
+       if (!hdmi->pwr_clks)
                return -ENOMEM;
 
-       for (i = 0; i < config->hpd_clk_cnt; i++)
-               hdmi->hpd_clks[i].id = config->hpd_clk_names[i];
+       for (i = 0; i < config->pwr_clk_cnt; i++)
+               hdmi->pwr_clks[i].id = config->pwr_clk_names[i];
 
-       ret = devm_clk_bulk_get(&pdev->dev, config->hpd_clk_cnt, hdmi->hpd_clks);
+       ret = devm_clk_bulk_get(&pdev->dev, config->pwr_clk_cnt, hdmi->pwr_clks);
        if (ret)
                return ret;
 
@@ -401,7 +401,7 @@ static int msm_hdmi_runtime_suspend(struct device *dev)
        struct hdmi *hdmi = dev_get_drvdata(dev);
        const struct hdmi_platform_config *config = hdmi->config;
 
-       clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks);
+       clk_bulk_disable_unprepare(config->pwr_clk_cnt, hdmi->pwr_clks);
 
        pinctrl_pm_select_sleep_state(dev);
 
@@ -424,7 +424,7 @@ static int msm_hdmi_runtime_resume(struct device *dev)
        if (ret)
                goto fail;
 
-       ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks);
+       ret = clk_bulk_prepare_enable(config->pwr_clk_cnt, hdmi->pwr_clks);
        if (ret)
                goto fail;
 
index 7e3c035cf913d713ed63379a843897fad96b23ab..a28437beb1574553c1dc00a0c693b390389353e0 100644 (file)
@@ -48,7 +48,7 @@ struct hdmi {
        phys_addr_t mmio_phy_addr;
 
        struct regulator_bulk_data *pwr_regs;
-       struct clk_bulk_data *hpd_clks;
+       struct clk_bulk_data *pwr_clks;
        struct clk *extp_clk;
 
        struct gpio_desc *hpd_gpiod;
@@ -87,8 +87,8 @@ struct hdmi_platform_config {
        int pwr_reg_cnt;
 
        /* clks that need to be on for hpd: */
-       const char * const *hpd_clk_names;
-       int hpd_clk_cnt;
+       const char * const *pwr_clk_names;
+       int pwr_clk_cnt;
 };
 
 struct hdmi_bridge {