diff options
author | Rob Clark <robdclark@gmail.com> | 2017-01-30 11:30:58 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-02-06 11:28:42 -0500 |
commit | 720c3bb80235ffb10129ee930bb394871afbd235 (patch) | |
tree | 5b72a487f25328e8fa398b71f0d6fe8104fc0e96 /drivers/gpu/drm/msm/msm_drv.c | |
parent | 4e09b95d72e502e200ad0f509fe89fb852add173 (diff) | |
download | linux-720c3bb80235ffb10129ee930bb394871afbd235.tar.gz linux-720c3bb80235ffb10129ee930bb394871afbd235.tar.xz |
drm/msm: drop _clk suffix from clk names
Suggested by Rob Herring. We still support the old names for
compatibility with downstream android dt files.
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 6b85c4195252..70226eaa5cac 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -91,6 +91,25 @@ module_param(dumpstate, bool, 0600); * Util/helpers: */ +struct clk *msm_clk_get(struct platform_device *pdev, const char *name) +{ + struct clk *clk; + char name2[32]; + + clk = devm_clk_get(&pdev->dev, name); + if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER) + return clk; + + snprintf(name2, sizeof(name2), "%s_clk", name); + + clk = devm_clk_get(&pdev->dev, name2); + if (!IS_ERR(clk)) + dev_warn(&pdev->dev, "Using legacy clk name binding. Use " + "\"%s\" instead of \"%s\"\n", name, name2); + + return clk; +} + void __iomem *msm_ioremap(struct platform_device *pdev, const char *name, const char *dbgname) { |