#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <edid.h>
#include <video_bridge.h>
int video_bridge_set_backlight(struct udevice *dev, int percent)
return ops->check_attached(dev);
}
+int video_bridge_read_edid(struct udevice *dev, u8 *buf, int buf_size)
+{
+ struct video_bridge_ops *ops = video_bridge_get_ops(dev);
+
+ if (!ops || !ops->read_edid)
+ return -ENOSYS;
+ return ops->read_edid(dev, buf, buf_size);
+}
+
static int video_bridge_pre_probe(struct udevice *dev)
{
struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev);
* @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) \
*/
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