2 * Copyright 2014 Google Inc.
4 * SPDX-License-Identifier: GPL-2.0+
11 struct display_timing;
14 * display_port_read_edid() - Read information from EDID
16 * @dev: Device to read from
17 * @buf: Buffer to read into (should be EDID_SIZE bytes)
18 * @buf_size: Buffer size (should be EDID_SIZE)
19 * @return number of bytes read, <=0 for error
21 int display_port_read_edid(struct udevice *dev, u8 *buf, int buf_size);
24 * display_port_enable() - Enable a display port device
26 * @dev: Device to enable
27 * @panel_bpp: Number of bits per pixel for panel
28 * @timing: Display timings
29 * @return 0 if OK, -ve on error
31 int display_port_enable(struct udevice *dev, int panel_bpp,
32 const struct display_timing *timing);
34 struct dm_display_port_ops {
36 * read_edid() - Read information from EDID
38 * @dev: Device to read from
39 * @buf: Buffer to read into (should be EDID_SIZE bytes)
40 * @buf_size: Buffer size (should be EDID_SIZE)
41 * @return number of bytes read, <=0 for error
43 int (*read_edid)(struct udevice *dev, u8 *buf, int buf_size);
46 * enable() - Enable the display port device
48 * @dev: Device to enable
49 * @panel_bpp: Number of bits per pixel for panel
50 * @timing: Display timings
51 * @return 0 if OK, -ve on error
53 int (*enable)(struct udevice *dev, int panel_bpp,
54 const struct display_timing *timing);
57 #define display_port_get_ops(dev) \
58 ((struct dm_display_port_ops *)(dev)->driver->ops)