[PATCH 1/4] video: edid: make accessible without i2c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Users can already populate fb_info::edid_data for cases where the EDID
doesn't come via an i2c controller managed by barebox.

Only thing missing is to be able to compile without i2c, thus drop
the dependency.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 drivers/video/Kconfig | 1 -
 drivers/video/edid.c  | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index a26bace176a1..56d009529ea4 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -106,7 +106,6 @@ config DRIVER_VIDEO_SIMPLEFB
 	  based on the active barebox framebuffer.
 
 config DRIVER_VIDEO_EDID
-	depends on I2C
 	bool "Add EDID support"
 	help
 	  This enabled support for reading and parsing EDID data from an attached
diff --git a/drivers/video/edid.c b/drivers/video/edid.c
index bee4594118bb..41d40d0297b6 100644
--- a/drivers/video/edid.c
+++ b/drivers/video/edid.c
@@ -858,6 +858,9 @@ void *edid_read_i2c(struct i2c_adapter *adapter)
 {
 	u8 *block;
 
+	if (!IS_ENABLED(CONFIG_I2C))
+		return NULL;
+
 	block = xmalloc(EDID_LENGTH);
 
 	if (edid_do_read_i2c(adapter, block, 0, EDID_LENGTH))
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux