1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
11 int backlight_enable(struct udevice *dev)
13 const struct backlight_ops *ops = backlight_get_ops(dev);
18 return ops->enable(dev);
21 int backlight_set_brightness(struct udevice *dev, int percent)
23 const struct backlight_ops *ops = backlight_get_ops(dev);
25 if (!ops->set_brightness)
28 return ops->set_brightness(dev, percent);
31 UCLASS_DRIVER(backlight) = {
32 .id = UCLASS_PANEL_BACKLIGHT,