1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
11 int panel_enable_backlight(struct udevice *dev)
13 struct panel_ops *ops = panel_get_ops(dev);
15 if (!ops->enable_backlight)
18 return ops->enable_backlight(dev);
22 * panel_set_backlight - Set brightness for the panel backlight
24 * @dev: Panel device containing the backlight to update
25 * @percent: Brightness value (0=off, 1=min brightness,
26 * 100=full brightness)
27 * @return 0 if OK, -ve on error
29 int panel_set_backlight(struct udevice *dev, int percent)
31 struct panel_ops *ops = panel_get_ops(dev);
33 if (!ops->set_backlight)
36 return ops->set_backlight(dev, percent);
39 int panel_get_display_timing(struct udevice *dev,
40 struct display_timing *timings)
42 struct panel_ops *ops = panel_get_ops(dev);
44 if (!ops->get_display_timing)
47 return ops->get_display_timing(dev, timings);
50 UCLASS_DRIVER(panel) = {