Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/hdmi: convert to msm_clk_get()

We already have, as a result of upstreaming the gpu bindings,
msm_clk_get() which will try to get the clock both without and with a
"_clk" suffix. Use this in HDMI code so we can drop the "_clk" suffix
in bindings while maintaing backwards compatibility.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>

+9 -11
+5 -5
drivers/gpu/drm/msm/hdmi/hdmi.c
··· 208 208 for (i = 0; i < config->hpd_clk_cnt; i++) { 209 209 struct clk *clk; 210 210 211 - clk = devm_clk_get(&pdev->dev, config->hpd_clk_names[i]); 211 + clk = msm_clk_get(pdev, config->hpd_clk_names[i]); 212 212 if (IS_ERR(clk)) { 213 213 ret = PTR_ERR(clk); 214 214 dev_err(&pdev->dev, "failed to get hpd clk: %s (%d)\n", ··· 228 228 for (i = 0; i < config->pwr_clk_cnt; i++) { 229 229 struct clk *clk; 230 230 231 - clk = devm_clk_get(&pdev->dev, config->pwr_clk_names[i]); 231 + clk = msm_clk_get(pdev, config->pwr_clk_names[i]); 232 232 if (IS_ERR(clk)) { 233 233 ret = PTR_ERR(clk); 234 234 dev_err(&pdev->dev, "failed to get pwr clk: %s (%d)\n", ··· 361 361 static struct hdmi_platform_config hdmi_tx_8660_config; 362 362 363 363 static const char *hpd_reg_names_8960[] = {"core-vdda", "hdmi-mux"}; 364 - static const char *hpd_clk_names_8960[] = {"core_clk", "master_iface_clk", "slave_iface_clk"}; 364 + static const char *hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; 365 365 366 366 static struct hdmi_platform_config hdmi_tx_8960_config = { 367 367 HDMI_CFG(hpd_reg, 8960), ··· 370 370 371 371 static const char *pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; 372 372 static const char *hpd_reg_names_8x74[] = {"hpd-gdsc", "hpd-5v"}; 373 - static const char *pwr_clk_names_8x74[] = {"extp_clk", "alt_iface_clk"}; 374 - static const char *hpd_clk_names_8x74[] = {"iface_clk", "core_clk", "mdp_core_clk"}; 373 + static const char *pwr_clk_names_8x74[] = {"extp", "alt_iface"}; 374 + static const char *hpd_clk_names_8x74[] = {"iface", "core", "mdp_core"}; 375 375 static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0}; 376 376 377 377 static struct hdmi_platform_config hdmi_tx_8974_config = {
+1 -1
drivers/gpu/drm/msm/hdmi/hdmi_phy.c
··· 48 48 for (i = 0; i < cfg->num_clks; i++) { 49 49 struct clk *clk; 50 50 51 - clk = devm_clk_get(dev, cfg->clk_names[i]); 51 + clk = msm_clk_get(phy->pdev, cfg->clk_names[i]); 52 52 if (IS_ERR(clk)) { 53 53 ret = PTR_ERR(clk); 54 54 dev_err(dev, "failed to get phy clock: %s (%d)\n",
+1 -1
drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
··· 48 48 }; 49 49 50 50 static const char * const hdmi_phy_8960_clk_names[] = { 51 - "slave_iface_clk", 51 + "slave_iface", 52 52 }; 53 53 54 54 const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg = {
+1 -2
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
··· 758 758 }; 759 759 760 760 static const char * const hdmi_phy_8996_clk_names[] = { 761 - "iface_clk", 762 - "ref_clk", 761 + "iface", "ref", 763 762 }; 764 763 765 764 const struct hdmi_phy_cfg msm_hdmi_phy_8996_cfg = {
+1 -2
drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c
··· 41 41 }; 42 42 43 43 static const char * const hdmi_phy_8x74_clk_names[] = { 44 - "iface_clk", 45 - "alt_iface_clk" 44 + "iface", "alt_iface" 46 45 }; 47 46 48 47 const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg = {