blob: aec44a8bf7a2d333e6fe5d56b4953d046e986a58 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass14d1c8e2016-01-21 19:44:58 -07002/*
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
Simon Glass14d1c8e2016-01-21 19:44:58 -07005 */
6
7#include <common.h>
8#include <dm.h>
9#include <panel.h>
10
11int 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
Yannick Fertrécfcb4322018-07-13 14:11:09 +020021int panel_get_display_timing(struct udevice *dev,
22 struct display_timing *timings)
23{
24 struct panel_ops *ops = panel_get_ops(dev);
25
26 if (!ops->get_display_timing)
27 return -ENOSYS;
28
29 return ops->get_display_timing(dev, timings);
30}
31
Simon Glass14d1c8e2016-01-21 19:44:58 -070032UCLASS_DRIVER(panel) = {
33 .id = UCLASS_PANEL,
34 .name = "panel",
35};