From: Neil Armstrong Date: Wed, 9 Oct 2024 08:01:56 +0000 (+0200) Subject: video: meson: dw-hdmi: do not fail probe if HDMI regulator is already enabled X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=8c914e53641e22a7fe5877c816085e1b3192b95b;p=u-boot.git video: meson: dw-hdmi: do not fail probe if HDMI regulator is already enabled If the regulator is already enabled, this happens if the regulator is set in regulator-always-on, regulator_set_enable() return -EALREADY. Ignore the -EALREADY return since it's not an error. Suggested-by: Jonas Karlman Link: https://lore.kernel.org/r/20241009-u-boot-video-fix-hdmi-supply-already-on-v2-1-4478a28d1f49@linaro.org Signed-off-by: Neil Armstrong --- diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 587df7beb9..1631dc3841 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -418,8 +418,8 @@ static int meson_dw_hdmi_probe(struct udevice *dev) } if (!ret) { - ret = regulator_set_enable(supply, true); - if (ret) + ret = regulator_set_enable_if_allowed(supply, true); + if (ret && ret != -ENOSYS) return ret; } #endif