blob: 17f5de96bafed9bfc0d922e6301ce6b856d5d79a [file] [log] [blame]
Simon Glass06679ad2015-04-14 21:03:38 -06001/*
2 * Copyright 2014 Google Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <displayport.h>
10#include <errno.h>
11
12int display_port_read_edid(struct udevice *dev, u8 *buf, int buf_size)
13{
14 struct dm_display_port_ops *ops = display_port_get_ops(dev);
15
16 if (!ops || !ops->read_edid)
17 return -ENOSYS;
18 return ops->read_edid(dev, buf, buf_size);
19}
20
21int display_port_enable(struct udevice *dev, int panel_bpp,
22 const struct display_timing *timing)
23{
24 struct dm_display_port_ops *ops = display_port_get_ops(dev);
25
26 if (!ops || !ops->enable)
27 return -ENOSYS;
28 return ops->enable(dev, panel_bpp, timing);
29}
30
31UCLASS_DRIVER(display_port) = {
32 .id = UCLASS_DISPLAY_PORT,
33 .name = "display_port",
34};