diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2017-02-08 07:47:49 -0500 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2017-02-17 02:04:26 -0500 |
commit | fc12bccda8b6f5c38139eceec9e369ed78091b2b (patch) | |
tree | 78cffad2343f78653f1ae1bcfd3ca3c83da961f6 | |
parent | 7089db84e356562f8ba737c29e472cc42d530dbc (diff) |
drm/imx: imx-tve: Do not set the regulator voltage
Commit deb65870b5d9d ("drm/imx: imx-tve: check the value returned by
regulator_set_voltage()") exposes the following probe issue:
63ff0000.tve supply dac not found, using dummy regulator
imx-drm display-subsystem: failed to bind 63ff0000.tve (ops imx_tve_ops): -22
When the 'dac-supply' is not passed in the device tree a dummy regulator is
used and setting its voltage is not allowed.
To fix this issue, do not set the dac-supply voltage inside the driver
and let its voltage be specified in the device tree.
Print a warning if the the 'dac-supply' voltage has a value different
from 2.75V.
Fixes: deb65870b5d9d ("drm/imx: imx-tve: check the value returned by regulator_set_voltage()")
Cc: <stable@vger.kernel.org> # 4.8+
Suggested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r-- | drivers/gpu/drm/imx/imx-tve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c index 3b602ee33c44..0c6bf12d45b1 100644 --- a/drivers/gpu/drm/imx/imx-tve.c +++ b/drivers/gpu/drm/imx/imx-tve.c | |||
@@ -98,6 +98,8 @@ | |||
98 | /* TVE_TST_MODE_REG */ | 98 | /* TVE_TST_MODE_REG */ |
99 | #define TVE_TVDAC_TEST_MODE_MASK (0x7 << 0) | 99 | #define TVE_TVDAC_TEST_MODE_MASK (0x7 << 0) |
100 | 100 | ||
101 | #define IMX_TVE_DAC_VOLTAGE 2750000 | ||
102 | |||
101 | enum { | 103 | enum { |
102 | TVE_MODE_TVOUT, | 104 | TVE_MODE_TVOUT, |
103 | TVE_MODE_VGA, | 105 | TVE_MODE_VGA, |
@@ -621,9 +623,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) | |||
621 | 623 | ||
622 | tve->dac_reg = devm_regulator_get(dev, "dac"); | 624 | tve->dac_reg = devm_regulator_get(dev, "dac"); |
623 | if (!IS_ERR(tve->dac_reg)) { | 625 | if (!IS_ERR(tve->dac_reg)) { |
624 | ret = regulator_set_voltage(tve->dac_reg, 2750000, 2750000); | 626 | if (regulator_get_voltage(tve->dac_reg) != IMX_TVE_DAC_VOLTAGE) |
625 | if (ret) | 627 | dev_warn(dev, "dac voltage is not %d uV\n", IMX_TVE_DAC_VOLTAGE); |
626 | return ret; | ||
627 | ret = regulator_enable(tve->dac_reg); | 628 | ret = regulator_enable(tve->dac_reg); |
628 | if (ret) | 629 | if (ret) |
629 | return ret; | 630 | return ret; |