forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #include <linux/of_device.h>
....@@ -37,8 +29,12 @@
3729 reg = devm_regulator_get(dev, cfg->reg_names[i]);
3830 if (IS_ERR(reg)) {
3931 ret = PTR_ERR(reg);
40
- dev_err(dev, "failed to get phy regulator: %s (%d)\n",
41
- cfg->reg_names[i], ret);
32
+ if (ret != -EPROBE_DEFER) {
33
+ DRM_DEV_ERROR(dev,
34
+ "failed to get phy regulator: %s (%d)\n",
35
+ cfg->reg_names[i], ret);
36
+ }
37
+
4238 return ret;
4339 }
4440
....@@ -51,7 +47,7 @@
5147 clk = msm_clk_get(phy->pdev, cfg->clk_names[i]);
5248 if (IS_ERR(clk)) {
5349 ret = PTR_ERR(clk);
54
- dev_err(dev, "failed to get phy clock: %s (%d)\n",
50
+ DRM_DEV_ERROR(dev, "failed to get phy clock: %s (%d)\n",
5551 cfg->clk_names[i], ret);
5652 return ret;
5753 }
....@@ -73,14 +69,14 @@
7369 for (i = 0; i < cfg->num_regs; i++) {
7470 ret = regulator_enable(phy->regs[i]);
7571 if (ret)
76
- dev_err(dev, "failed to enable regulator: %s (%d)\n",
72
+ DRM_DEV_ERROR(dev, "failed to enable regulator: %s (%d)\n",
7773 cfg->reg_names[i], ret);
7874 }
7975
8076 for (i = 0; i < cfg->num_clks; i++) {
8177 ret = clk_prepare_enable(phy->clks[i]);
8278 if (ret)
83
- dev_err(dev, "failed to enable clock: %s (%d)\n",
79
+ DRM_DEV_ERROR(dev, "failed to enable clock: %s (%d)\n",
8480 cfg->clk_names[i], ret);
8581 }
8682
....@@ -159,7 +155,7 @@
159155
160156 phy->mmio = msm_ioremap(pdev, "hdmi_phy", "HDMI_PHY");
161157 if (IS_ERR(phy->mmio)) {
162
- dev_err(dev, "%s: failed to map phy base\n", __func__);
158
+ DRM_DEV_ERROR(dev, "%s: failed to map phy base\n", __func__);
163159 return -ENOMEM;
164160 }
165161
....@@ -177,7 +173,7 @@
177173
178174 ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type);
179175 if (ret) {
180
- dev_err(dev, "couldn't init PLL\n");
176
+ DRM_DEV_ERROR(dev, "couldn't init PLL\n");
181177 msm_hdmi_phy_resource_disable(phy);
182178 return ret;
183179 }