diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-01-01 23:52:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-01-05 13:11:16 +0100 |
commit | 2f523f3a134d0c8133354cf3105a4e944d078f48 (patch) | |
tree | 88872732d4c38465f06f5b4f37ca388a0dc60434 | |
parent | cada638c2f116ce79973824d3bf088799625f624 (diff) | |
download | barebox-2f523f3a134d0c8133354cf3105a4e944d078f48.tar.gz barebox-2f523f3a134d0c8133354cf3105a4e944d078f48.tar.xz |
video: edid: make accessible without i2c
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@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/video/Kconfig | 1 | ||||
-rw-r--r-- | drivers/video/edid.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index a26bace176..56d009529e 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 bee4594118..41d40d0297 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)) |