diff options
Diffstat (limited to 'drivers/video/backlight-uclass.c')
-rw-r--r-- | drivers/video/backlight-uclass.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/backlight-uclass.c b/drivers/video/backlight-uclass.c index 92715e2f13..0aadf8a1f9 100644 --- a/drivers/video/backlight-uclass.c +++ b/drivers/video/backlight-uclass.c @@ -18,6 +18,16 @@ int backlight_enable(struct udevice *dev) return ops->enable(dev); } +int backlight_set_brightness(struct udevice *dev, int percent) +{ + const struct backlight_ops *ops = backlight_get_ops(dev); + + if (!ops->set_brightness) + return -ENOSYS; + + return ops->set_brightness(dev, percent); +} + UCLASS_DRIVER(backlight) = { .id = UCLASS_PANEL_BACKLIGHT, .name = "backlight", |