Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 14d1c8e | 2016-01-21 19:44:58 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
Simon Glass | 14d1c8e | 2016-01-21 19:44:58 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _PANEL_H |
| 8 | #define _PANEL_H |
| 9 | |
| 10 | struct panel_ops { |
| 11 | /** |
| 12 | * enable_backlight() - Enable the panel backlight |
| 13 | * |
| 14 | * @dev: Panel device containing the backlight to enable |
| 15 | * @return 0 if OK, -ve on error |
| 16 | */ |
| 17 | int (*enable_backlight)(struct udevice *dev); |
Yannick Fertré | cfcb432 | 2018-07-13 14:11:09 +0200 | [diff] [blame] | 18 | /** |
| 19 | * get_timings() - Get display timings from panel. |
| 20 | * |
| 21 | * @dev: Panel device containing the display timings |
| 22 | * @tim: Place to put timings |
| 23 | * @return 0 if OK, -ve on error |
| 24 | */ |
| 25 | int (*get_display_timing)(struct udevice *dev, |
| 26 | struct display_timing *timing); |
Simon Glass | 14d1c8e | 2016-01-21 19:44:58 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | #define panel_get_ops(dev) ((struct panel_ops *)(dev)->driver->ops) |
| 30 | |
| 31 | /** |
| 32 | * panel_enable_backlight() - Enable the panel backlight |
| 33 | * |
| 34 | * @dev: Panel device containing the backlight to enable |
| 35 | * @return 0 if OK, -ve on error |
| 36 | */ |
| 37 | int panel_enable_backlight(struct udevice *dev); |
| 38 | |
Yannick Fertré | cfcb432 | 2018-07-13 14:11:09 +0200 | [diff] [blame] | 39 | /** |
| 40 | * panel_get_display_timing() - Get display timings from panel. |
| 41 | * |
| 42 | * @dev: Panel device containing the display timings |
| 43 | * @return 0 if OK, -ve on error |
| 44 | */ |
| 45 | int panel_get_display_timing(struct udevice *dev, |
| 46 | struct display_timing *timing); |
| 47 | |
Simon Glass | 14d1c8e | 2016-01-21 19:44:58 -0700 | [diff] [blame] | 48 | #endif |