diff options
author | Simon Glass <sjg@chromium.org> | 2016-01-21 19:44:53 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-01-21 20:42:36 -0700 |
commit | d4bf91ada110aeb26f844cbe95cdb9b1ddb87f19 (patch) | |
tree | 10db820ec311f9730d0c581d0285802d8780697a /drivers/video/bridge/video-bridge-uclass.c | |
parent | 68dcdc99c51c0f0e4678b3b2b66249f3c6715d34 (diff) | |
download | talos-obmc-uboot-d4bf91ada110aeb26f844cbe95cdb9b1ddb87f19.tar.gz talos-obmc-uboot-d4bf91ada110aeb26f844cbe95cdb9b1ddb87f19.zip |
video: bridge: Allow GPIOs to be optional
Some video bridges will not have GPIOs to control reset, etc. Allow these
to be optional.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video/bridge/video-bridge-uclass.c')
-rw-r--r-- | drivers/video/bridge/video-bridge-uclass.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c index 6c5990f54c..07270bac9e 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; |