mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
drm/imx: imx-tve: Do not set the regulator voltage
commitfc12bccda8upstream. Commitdeb65870b5("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:deb65870b5("drm/imx: imx-tve: check the value returned by regulator_set_voltage()") 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a654a8593
commit
98620b564f
@@ -98,6 +98,8 @@
|
|||||||
/* TVE_TST_MODE_REG */
|
/* TVE_TST_MODE_REG */
|
||||||
#define TVE_TVDAC_TEST_MODE_MASK (0x7 << 0)
|
#define TVE_TVDAC_TEST_MODE_MASK (0x7 << 0)
|
||||||
|
|
||||||
|
#define IMX_TVE_DAC_VOLTAGE 2750000
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TVE_MODE_TVOUT,
|
TVE_MODE_TVOUT,
|
||||||
TVE_MODE_VGA,
|
TVE_MODE_VGA,
|
||||||
@@ -628,9 +630,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
|
|||||||
|
|
||||||
tve->dac_reg = devm_regulator_get(dev, "dac");
|
tve->dac_reg = devm_regulator_get(dev, "dac");
|
||||||
if (!IS_ERR(tve->dac_reg)) {
|
if (!IS_ERR(tve->dac_reg)) {
|
||||||
ret = regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
|
if (regulator_get_voltage(tve->dac_reg) != IMX_TVE_DAC_VOLTAGE)
|
||||||
if (ret)
|
dev_warn(dev, "dac voltage is not %d uV\n", IMX_TVE_DAC_VOLTAGE);
|
||||||
return ret;
|
|
||||||
ret = regulator_enable(tve->dac_reg);
|
ret = regulator_enable(tve->dac_reg);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user