Convert CONFIG_FSL_MEMAC et al to Kconfig
[platform/kernel/u-boot.git] / include / video_bridge.h
index c7b8681..3b429ea 100644 (file)
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2015 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __VIDEO_BRIDGE
@@ -53,6 +52,16 @@ struct video_bridge_ops {
         * @return 0 if OK, -ve on error
         */
        int (*set_backlight)(struct udevice *dev, int percent);
+
+       /**
+        * read_edid() - Read information from EDID
+        *
+        * @dev:        Device to read from
+        * @buf:        Buffer to read into
+        * @buf_size:   Buffer size
+        * @return number of bytes read, <=0 for error
+        */
+       int (*read_edid)(struct udevice *dev, u8 *buf, int buf_size);
 };
 
 #define video_bridge_get_ops(dev) \
@@ -61,7 +70,7 @@ struct video_bridge_ops {
 /**
  * video_bridge_attach() - attach a video bridge
  *
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int video_bridge_attach(struct udevice *dev);
 
@@ -69,7 +78,7 @@ int video_bridge_attach(struct udevice *dev);
  * video_bridge_set_backlight() - Set the backlight brightness
  *
  * @percent:   brightness percentage (0=off, 100=full brightness)
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int video_bridge_set_backlight(struct udevice *dev, int percent);
 
@@ -85,8 +94,18 @@ int video_bridge_set_active(struct udevice *dev, bool active);
  * check_attached() - check if a bridge is correctly attached
  *
  * @dev:       Device to check
- * @return 0 if attached, -EENOTCONN if not, or other -ve error
+ * Return: 0 if attached, -EENOTCONN if not, or other -ve error
  */
 int video_bridge_check_attached(struct udevice *dev);
 
+/**
+ * video_bridge_read_edid() - Read information from EDID
+ *
+ * @dev:       Device to read from
+ * @buf:       Buffer to read into
+ * @buf_size:  Buffer size
+ * Return: number of bytes read, <=0 for error
+ */
+int video_bridge_read_edid(struct udevice *dev, u8 *buf, int buf_size);
+
 #endif