Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | f563dc1 | 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 | f563dc1 | 2016-01-21 19:44:58 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <dm.h> |
| 9 | #include <panel.h> |
| 10 | |
| 11 | int panel_enable_backlight(struct udevice *dev) |
| 12 | { |
| 13 | struct panel_ops *ops = panel_get_ops(dev); |
| 14 | |
| 15 | if (!ops->enable_backlight) |
| 16 | return -ENOSYS; |
| 17 | |
| 18 | return ops->enable_backlight(dev); |
| 19 | } |
| 20 | |
| 21 | UCLASS_DRIVER(panel) = { |
| 22 | .id = UCLASS_PANEL, |
| 23 | .name = "panel", |
| 24 | }; |