Skip to content

Commit a7a1550

Browse files
committed
drm/msm/hdmi: rename hpd_clks to pwr_clks
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 <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/651720/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 0c5ec81 commit a7a1550

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

drivers/gpu/drm/msm/hdmi/hdmi.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,19 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
226226
.item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry)
227227

228228
static const char * const pwr_reg_names_8960[] = {"core-vdda"};
229-
static const char * const hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
229+
static const char * const pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
230230

231231
static const struct hdmi_platform_config hdmi_tx_8960_config = {
232232
HDMI_CFG(pwr_reg, 8960),
233-
HDMI_CFG(hpd_clk, 8960),
233+
HDMI_CFG(pwr_clk, 8960),
234234
};
235235

236236
static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"};
237-
static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
237+
static const char * const pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
238238

239239
static const struct hdmi_platform_config hdmi_tx_8974_config = {
240240
HDMI_CFG(pwr_reg, 8x74),
241-
HDMI_CFG(hpd_clk, 8x74),
241+
HDMI_CFG(pwr_clk, 8x74),
242242
};
243243

244244
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)
333333
if (ret)
334334
return dev_err_probe(dev, ret, "failed to get pwr regulators\n");
335335

336-
hdmi->hpd_clks = devm_kcalloc(&pdev->dev,
337-
config->hpd_clk_cnt,
338-
sizeof(hdmi->hpd_clks[0]),
336+
hdmi->pwr_clks = devm_kcalloc(&pdev->dev,
337+
config->pwr_clk_cnt,
338+
sizeof(hdmi->pwr_clks[0]),
339339
GFP_KERNEL);
340-
if (!hdmi->hpd_clks)
340+
if (!hdmi->pwr_clks)
341341
return -ENOMEM;
342342

343-
for (i = 0; i < config->hpd_clk_cnt; i++)
344-
hdmi->hpd_clks[i].id = config->hpd_clk_names[i];
343+
for (i = 0; i < config->pwr_clk_cnt; i++)
344+
hdmi->pwr_clks[i].id = config->pwr_clk_names[i];
345345

346-
ret = devm_clk_bulk_get(&pdev->dev, config->hpd_clk_cnt, hdmi->hpd_clks);
346+
ret = devm_clk_bulk_get(&pdev->dev, config->pwr_clk_cnt, hdmi->pwr_clks);
347347
if (ret)
348348
return ret;
349349

@@ -401,7 +401,7 @@ static int msm_hdmi_runtime_suspend(struct device *dev)
401401
struct hdmi *hdmi = dev_get_drvdata(dev);
402402
const struct hdmi_platform_config *config = hdmi->config;
403403

404-
clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks);
404+
clk_bulk_disable_unprepare(config->pwr_clk_cnt, hdmi->pwr_clks);
405405

406406
pinctrl_pm_select_sleep_state(dev);
407407

@@ -424,7 +424,7 @@ static int msm_hdmi_runtime_resume(struct device *dev)
424424
if (ret)
425425
goto fail;
426426

427-
ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks);
427+
ret = clk_bulk_prepare_enable(config->pwr_clk_cnt, hdmi->pwr_clks);
428428
if (ret)
429429
goto fail;
430430

drivers/gpu/drm/msm/hdmi/hdmi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct hdmi {
4848
phys_addr_t mmio_phy_addr;
4949

5050
struct regulator_bulk_data *pwr_regs;
51-
struct clk_bulk_data *hpd_clks;
51+
struct clk_bulk_data *pwr_clks;
5252
struct clk *extp_clk;
5353

5454
struct gpio_desc *hpd_gpiod;
@@ -87,8 +87,8 @@ struct hdmi_platform_config {
8787
int pwr_reg_cnt;
8888

8989
/* clks that need to be on for hpd: */
90-
const char * const *hpd_clk_names;
91-
int hpd_clk_cnt;
90+
const char * const *pwr_clk_names;
91+
int pwr_clk_cnt;
9292
};
9393

9494
struct hdmi_bridge {

0 commit comments

Comments
 (0)