]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/omap: Remove regulator API abuse
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 28 Apr 2016 12:42:18 +0000 (15:42 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 31 May 2016 05:28:31 +0000 (08:28 +0300)
regulator_can_change_voltage() is deprecated and it's use is not necessary
as commit:
6a0028b3dd67b regulator: Deprecate regulator_can_change_voltage()
describers it clearly.

Also, regulator_set_voltage() is misused in the driver, as it is
supposed to be used only in cases where the regulator voltage needs to
be changed dynamically at runtime. In DSS's case, we always want a fixed
voltage, set in the .dts files.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/hdmi4.c
drivers/gpu/drm/omapdrm/dss/hdmi5.c

index 8730646a0cbb260c4482d9c2dad58c9c89d9f597..9ed8272e54ae183240c7560f35f969470acb6e5e 100644 (file)
@@ -1180,15 +1180,6 @@ static int dsi_regulator_init(struct platform_device *dsidev)
                return PTR_ERR(vdds_dsi);
        }
 
-       if (regulator_can_change_voltage(vdds_dsi)) {
-               r = regulator_set_voltage(vdds_dsi, 1800000, 1800000);
-               if (r) {
-                       devm_regulator_put(vdds_dsi);
-                       DSSERR("can't set the DSI regulator voltage\n");
-                       return r;
-               }
-       }
-
        dsi->vdds_dsi_reg = vdds_dsi;
 
        return 0;
index eef260ff420db74b4d5380909cdfd2a3d062b81b..f93c70acb7682289c7d1a5e192b66328b776f9a0 100644 (file)
@@ -115,15 +115,6 @@ static int hdmi_init_regulator(void)
                return PTR_ERR(reg);
        }
 
-       if (regulator_can_change_voltage(reg)) {
-               r = regulator_set_voltage(reg, 1800000, 1800000);
-               if (r) {
-                       devm_regulator_put(reg);
-                       DSSWARN("can't set the regulator voltage\n");
-                       return r;
-               }
-       }
-
        hdmi.vdda_reg = reg;
 
        return 0;
index 417dff5eb7cbe5935744d2666b3ae93828feb584..e129245eb8a9f56c989b342aca9ad25e15abfc8d 100644 (file)
@@ -132,15 +132,6 @@ static int hdmi_init_regulator(void)
                return PTR_ERR(reg);
        }
 
-       if (regulator_can_change_voltage(reg)) {
-               r = regulator_set_voltage(reg, 1800000, 1800000);
-               if (r) {
-                       devm_regulator_put(reg);
-                       DSSWARN("can't set the regulator voltage\n");
-                       return r;
-               }
-       }
-
        hdmi.vdda_reg = reg;
 
        return 0;