diff mbox

[U-Boot,v2,05/37] video: bridge: Allow GPIOs to be optional

Message ID 1453430725-4641-6-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Jan. 22, 2016, 2:44 a.m. UTC
Some video bridges will not have GPIOs to control reset, etc. Allow these
to be optional.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 drivers/video/bridge/video-bridge-uclass.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Simon Glass Jan. 22, 2016, 6:38 p.m. UTC | #1
On 21 January 2016 at 19:44, Simon Glass <sjg@chromium.org> wrote:
> Some video bridges will not have GPIOs to control reset, etc. Allow these
> to be optional.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  drivers/video/bridge/video-bridge-uclass.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Applied to u-boot-rockchip.
diff mbox

Patch

diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 6c5990f..07270ba 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -55,7 +55,8 @@  static int video_bridge_pre_probe(struct udevice *dev)
 				   &uc_priv->sleep, GPIOD_IS_OUT);
 	if (ret) {
 		debug("%s: Could not decode sleep-gpios (%d)\n", __func__, ret);
-		return ret;
+		if (ret != -ENOENT)
+			return ret;
 	}
 	/*
 	 * Drop this for now as we do not have driver model pinctrl support
@@ -70,7 +71,8 @@  static int video_bridge_pre_probe(struct udevice *dev)
 				   GPIOD_IS_OUT);
 	if (ret) {
 		debug("%s: Could not decode reset-gpios (%d)\n", __func__, ret);
-		return ret;
+		if (ret != -ENOENT)
+			return ret;
 	}
 	/*
 	 * Drop this for now as we do not have driver model pinctrl support
@@ -83,9 +85,10 @@  static int video_bridge_pre_probe(struct udevice *dev)
 	 */
 	ret = gpio_request_by_name(dev, "hotplug-gpios", 0, &uc_priv->hotplug,
 				   GPIOD_IS_IN);
-	if (ret && ret != -ENOENT) {
+	if (ret) {
 		debug("%s: Could not decode hotplug (%d)\n", __func__, ret);
-		return ret;
+		if (ret != -ENOENT)
+			return ret;
 	}
 
 	return 0;