From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagrant Cascadian Date: Sat, 29 Sep 2018 16:45:50 -0700 Subject: [U-Boot] [PATCH 2/5] dm: video: bridge: don't fail to activate bridge if sleep gpio is missing In-Reply-To: <20180929234553.31019-1-vagrant@debian.org> References: <20180929234553.31019-1-vagrant@debian.org> Message-ID: <20180929234553.31019-3-vagrant@debian.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Vasily Khoruzhick Sleep gpio is optional, so it's possible to have reset gpio, but no sleep gpio. We shouldn't fail early in case of missing sleep gpio, otherwise we won't deassert reset. Signed-off-by: Vasily Khoruzhick Signed-off-by: Vagrant Cascadian --- drivers/video/bridge/video-bridge-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c index cd4959cc71..46936a0626 100644 --- a/drivers/video/bridge/video-bridge-uclass.c +++ b/drivers/video/bridge/video-bridge-uclass.c @@ -110,7 +110,7 @@ int video_bridge_set_active(struct udevice *dev, bool active) debug("%s: %d\n", __func__, active); ret = dm_gpio_set_value(&uc_priv->sleep, !active); - if (ret) + if (ret != -ENOENT) return ret; if (active) { ret = dm_gpio_set_value(&uc_priv->reset, true); @@ -120,7 +120,7 @@ int video_bridge_set_active(struct udevice *dev, bool active) ret = dm_gpio_set_value(&uc_priv->reset, false); } - return ret; + return 0; } UCLASS_DRIVER(video_bridge) = { -- 2.11.0