fbdev: Add generic ddc read functionality
PATCH 8/13 fbdev: Add generic ddc read functionality
From: Dennis Munsie <[email protected]>
Adds functionality to read the EDID information over the DDC bus in a generic way. This code is based on the DDC implementation in the radeon driver.
[adaplas]
- separate from fbmon.c and place in new file fb_ddc.c
- remove dependency to CONFIG_I2C and CONFIG_I2C_ALGOBIT, otherwise, feature will not compile if i2c support is compiled as a module
- feature is selectable only by drivers needing it. It must have a 'select FB_DDC if xxx' in Kconfig
- change printk's to dev_*, the i2c people prefers it
---
drivers/video/Kconfig | 5 ++ drivers/video/Makefile | 1 drivers/video/fb_ddc.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/fb.h | 2 + 4 files changed, 124 insertions(+), 0 deletions(-)
drivers/video/Kconfig +5 -0
@@ -53,6 +53,11 @@ config FB (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. +config FB_DDC + tristate + depends on FB && I2C && I2C_ALGOBIT + default n + config FB_CFB_FILLRECT tristate depends on FB
drivers/video/Makefile +1 -0
@@ -18,6 +18,7 @@ obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfil obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o obj-$(CONFIG_FB_MACMODES) += macmodes.o +obj-$(CONFIG_FB_DDC) += fb_ddc.o # Hardware specific drivers go first obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o
drivers/video/fb_ddc.c new file +116 -0
116 lines not on this page · raw message
include/linux/fb.h +2 -0
@@ -3,6 +3,7 @@ #define _LINUX_FB_H#include <linux/backlight.h> #include <asm/types.h> +#include <linux/i2c.h> /* Definitions of frame buffers */
@@ -940,6 +941,7 @@ extern void fb_edid_to_monspecs(unsigned struct fb_monspecs *specs);extern void fb_destroy_modedb (struct fb_videomode *modedb);extern int fb_find_mode_cvt (struct fb_videomode *mode,int margins,int rb); +extern unsigned char *fb_ddc_read (struct i2c_adapter *adapter);/* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV