Commit 1d15c165 authored by Archit Taneja's avatar Archit Taneja Committed by Rob Clark

drm/msm/edp: Drop regulator_set_voltage call

The eDP driver tries to set a fixed voltage for one of its regulators(vdda)
before enabling it. This shouldn't be done by the driver, the voltage
constraints should be specified on the regulator via DT and managed by
the regulator core. A driver should call regulator_set_voltage only if
it needs to change the voltage during runtime. Drop the
regulator_set_voltage call. Mention in a comment the voltage that the
regulator expects.
Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent f377d597
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "edp.h" #include "edp.h"
#include "edp.xml.h" #include "edp.xml.h"
#define VDDA_MIN_UV 1800000 /* uV units */
#define VDDA_MAX_UV 1800000 /* uV units */
#define VDDA_UA_ON_LOAD 100000 /* uA units */ #define VDDA_UA_ON_LOAD 100000 /* uA units */
#define VDDA_UA_OFF_LOAD 100 /* uA units */ #define VDDA_UA_OFF_LOAD 100 /* uA units */
...@@ -67,7 +65,7 @@ struct edp_ctrl { ...@@ -67,7 +65,7 @@ struct edp_ctrl {
void __iomem *base; void __iomem *base;
/* regulators */ /* regulators */
struct regulator *vdda_vreg; struct regulator *vdda_vreg; /* 1.8 V */
struct regulator *lvl_vreg; struct regulator *lvl_vreg;
/* clocks */ /* clocks */
...@@ -329,12 +327,6 @@ static int edp_regulator_enable(struct edp_ctrl *ctrl) ...@@ -329,12 +327,6 @@ static int edp_regulator_enable(struct edp_ctrl *ctrl)
{ {
int ret; int ret;
ret = regulator_set_voltage(ctrl->vdda_vreg, VDDA_MIN_UV, VDDA_MAX_UV);
if (ret) {
pr_err("%s:vdda_vreg set_voltage failed, %d\n", __func__, ret);
goto vdda_set_fail;
}
ret = regulator_set_load(ctrl->vdda_vreg, VDDA_UA_ON_LOAD); ret = regulator_set_load(ctrl->vdda_vreg, VDDA_UA_ON_LOAD);
if (ret < 0) { if (ret < 0) {
pr_err("%s: vdda_vreg set regulator mode failed.\n", __func__); pr_err("%s: vdda_vreg set regulator mode failed.\n", __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment