]> git.sur5r.net Git - u-boot/blob - drivers/video/backlight-uclass.c
gpio: omap_gpio: Convert to auto-alloc feature when DT is supported
[u-boot] / drivers / video / backlight-uclass.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (c) 2016 Google, Inc
4  * Written by Simon Glass <sjg@chromium.org>
5  */
6
7 #include <common.h>
8 #include <dm.h>
9 #include <backlight.h>
10
11 int backlight_enable(struct udevice *dev)
12 {
13         const struct backlight_ops *ops = backlight_get_ops(dev);
14
15         if (!ops->enable)
16                 return -ENOSYS;
17
18         return ops->enable(dev);
19 }
20
21 UCLASS_DRIVER(backlight) = {
22         .id             = UCLASS_PANEL_BACKLIGHT,
23         .name           = "backlight",
24 };