diff options
author | Nikhil M Jain <n-jain1@ti.com> | 2023-01-31 15:35:16 +0530 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2023-02-04 18:16:00 +0100 |
commit | 3ebe3c703bf549c740f5bcc08289c2bab6aca1ca (patch) | |
tree | 2b668d4d7b84c65b322c21cd83bf56610680c0d6 /drivers | |
parent | 2f3d6a42300616630b3c9c1e52cb6e58da390393 (diff) | |
download | u-boot-3ebe3c703bf549c740f5bcc08289c2bab6aca1ca.tar.gz u-boot-3ebe3c703bf549c740f5bcc08289c2bab6aca1ca.tar.bz2 u-boot-3ebe3c703bf549c740f5bcc08289c2bab6aca1ca.zip |
drivers: video: simple_panel: make simple panel independent of backlight
This patch updates the necessary Kconfigs to make simple panel
driver independent of backlight driver and compiling backlight
related code in simple-panel driver conditionally to when user
has set CONFIG_BACKLIGHT.
Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/simple_panel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c index c8f7022ea6..91c91ee75d 100644 --- a/drivers/video/simple_panel.c +++ b/drivers/video/simple_panel.c @@ -63,12 +63,15 @@ static int simple_panel_of_to_plat(struct udevice *dev) return ret; } } + ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev, - "backlight", &priv->backlight); + "backlight", &priv->backlight); if (ret) { debug("%s: Cannot get backlight: ret=%d\n", __func__, ret); - return log_ret(ret); + if (ret != -ENOENT) + return log_ret(ret); } + ret = gpio_request_by_name(dev, "enable-gpios", 0, &priv->enable, GPIOD_IS_OUT); if (ret) { |