1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
12 * enable_backlight() - Enable the panel backlight
14 * @dev: Panel device containing the backlight to enable
15 * @return 0 if OK, -ve on error
17 int (*enable_backlight)(struct udevice *dev);
20 * set_backlight - Set panel backlight brightness
22 * @dev: Panel device containing the backlight to update
23 * @percent: Brightness value (0 to 100, or BACKLIGHT_... value)
24 * @return 0 if OK, -ve on error
26 int (*set_backlight)(struct udevice *dev, int percent);
29 * get_timings() - Get display timings from panel.
31 * @dev: Panel device containing the display timings
32 * @tim: Place to put timings
33 * @return 0 if OK, -ve on error
35 int (*get_display_timing)(struct udevice *dev,
36 struct display_timing *timing);
39 #define panel_get_ops(dev) ((struct panel_ops *)(dev)->driver->ops)
42 * panel_enable_backlight() - Enable/disable the panel backlight
44 * @dev: Panel device containing the backlight to enable
45 * @enable: true to enable the backlight, false to dis
46 * Return: 0 if OK, -ve on error
48 int panel_enable_backlight(struct udevice *dev);
51 * panel_set_backlight - Set brightness for the panel backlight
53 * @dev: Panel device containing the backlight to update
54 * @percent: Brightness value (0 to 100, or BACKLIGHT_... value)
55 * Return: 0 if OK, -ve on error
57 int panel_set_backlight(struct udevice *dev, int percent);
60 * panel_get_display_timing() - Get display timings from panel.
62 * @dev: Panel device containing the display timings
63 * Return: 0 if OK, -ve on error
65 int panel_get_display_timing(struct udevice *dev,
66 struct display_timing *timing);