mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
video: meson: hdmi-supply regulator should be optional
Some boards don't have such a regulator, and don't need one to enable HDMI display. Make it optional, fixing hdmi display for those boards. Also surround the regulator code with a config check on DM_REGULATOR. Reported-by: Mohammad Rasim <mohammad.rasim96@gmail.com> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
This commit is contained in:
parent
ffe8a92b4b
commit
f944b15966
1 changed files with 10 additions and 4 deletions
|
@ -361,13 +361,19 @@ static int meson_dw_hdmi_probe(struct udevice *dev)
|
|||
priv->hdmi.i2c_clk_high = 0x67;
|
||||
priv->hdmi.i2c_clk_low = 0x78;
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_REGULATOR)
|
||||
ret = device_get_supply_regulator(dev, "hdmi-supply", &supply);
|
||||
if (ret)
|
||||
if (ret && ret != -ENOENT) {
|
||||
pr_err("Failed to get HDMI regulator\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = regulator_set_enable(supply, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!ret) {
|
||||
ret = regulator_set_enable(supply, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = reset_get_bulk(dev, &resets);
|
||||
if (ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue