The patch titled cirrus-logic-framebuffer-i2c-support update has been added to the -mm tree. Its filename is cirrus-logic-framebuffer-i2c-support-update.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: cirrus-logic-framebuffer-i2c-support update From: Krzysztof Halasa <khc@xxxxxxxxx> Signed-off-by: Krzysztof Halasa <khc@xxxxxxxxx> Cc: Jean Delvare <khali@xxxxxxxxxxxx> Cc: "Antonino A. Daplas" <adaplas@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/video/Kconfig | 7 ++--- drivers/video/cirrusfb.c | 50 ++++++++++++++++++++----------------- include/linux/i2c-id.h | 1 3 files changed, 33 insertions(+), 25 deletions(-) diff -puN drivers/video/cirrusfb.c~cirrus-logic-framebuffer-i2c-support-update drivers/video/cirrusfb.c --- a/drivers/video/cirrusfb.c~cirrus-logic-framebuffer-i2c-support-update +++ a/drivers/video/cirrusfb.c @@ -46,8 +46,6 @@ #include <linux/fb.h> #include <linux/init.h> #include <linux/selection.h> -#include <linux/i2c.h> -#include <linux/i2c-algo-bit.h> #include <asm/pgtable.h> #ifdef CONFIG_ZORRO @@ -65,6 +63,10 @@ #else #define isPReP 0 #endif +#ifdef CONFIG_FB_CIRRUS_I2C +#include <linux/i2c.h> +#include <linux/i2c-algo-bit.h> +#endif #include "video/vga.h" #include "video/cirrus.h" @@ -406,10 +408,11 @@ struct cirrusfb_info { u32 pseudo_palette[16]; struct { u8 red, green, blue, pad; } palette[256]; + #ifdef CONFIG_FB_CIRRUS_I2C int i2c_used; - struct i2c_adapter alpine_ops; - struct i2c_algo_bit_data bit_alpine_data; + struct i2c_adapter cirrus_ops; + struct i2c_algo_bit_data bit_cirrus_data; #endif #ifdef CONFIG_ZORRO struct zorro_dev *zdev; @@ -2377,25 +2380,28 @@ static int cirrusfb_register(struct cirr if (cinfo->btype == BT_ALPINE || cinfo->btype == BT_PICASSO4) { vga_wseq(cinfo->regbase, 0x08, 0x41); /* DDC mode: SCL */ vga_wseq(cinfo->regbase, 0x08, 0x43); /* DDC mode: SCL + SDA */ - cinfo->bit_alpine_data.setsda = alpine_setsda; - cinfo->bit_alpine_data.setscl = alpine_setscl; - cinfo->bit_alpine_data.getsda = alpine_getsda; - cinfo->bit_alpine_data.getscl = alpine_getscl; - cinfo->bit_alpine_data.udelay = 5; - cinfo->bit_alpine_data.mdelay = 1; - cinfo->bit_alpine_data.timeout = HZ; - cinfo->bit_alpine_data.data = cinfo; - cinfo->alpine_ops.owner = THIS_MODULE; - cinfo->alpine_ops.id = I2C_HW_B_LP; - cinfo->alpine_ops.algo_data = &cinfo->bit_alpine_data; - strlcpy(cinfo->alpine_ops.name, - "Cirrus Logic Alpine DDC I2C adapter", I2C_NAME_SIZE); - if (!(err = i2c_bit_add_bus(&cinfo->alpine_ops))) { - printk(KERN_DEBUG "Initialized Alpine I2C adapter\n"); + cinfo->bit_cirrus_data.setsda = alpine_setsda; + cinfo->bit_cirrus_data.setscl = alpine_setscl; + cinfo->bit_cirrus_data.getsda = alpine_getsda; + cinfo->bit_cirrus_data.getscl = alpine_getscl; + cinfo->bit_cirrus_data.udelay = 5; + cinfo->bit_cirrus_data.mdelay = 1; + cinfo->bit_cirrus_data.timeout = HZ; + cinfo->bit_cirrus_data.data = cinfo; + cinfo->cirrus_ops.owner = THIS_MODULE; + cinfo->cirrus_ops.id = I2C_HW_B_CIRRUS; + cinfo->cirrus_ops.class = I2C_CLASS_DDC; + cinfo->cirrus_ops.algo_data = &cinfo->bit_cirrus_data; + cinfo->cirrus_ops.dev.parent = info->device; + strlcpy(cinfo->cirrus_ops.name, "Cirrus Logic DDC I2C adapter", + I2C_NAME_SIZE); + if (!(err = i2c_bit_add_bus(&cinfo->cirrus_ops))) { + printk(KERN_DEBUG "Initialized Cirrus Logic I2C" + " adapter\n"); cinfo->i2c_used = 1; } else - printk(KERN_WARNING "Unable to initialize Alpine I2C" - "adapter (result = %i)\n", err); + printk(KERN_WARNING "Unable to initialize Cirrus" + " Logic I2C adapter (result = %i)\n", err); } #endif @@ -2416,7 +2422,7 @@ static void __devexit cirrusfb_cleanup ( #ifdef CONFIG_FB_CIRRUS_I2C if (cinfo->i2c_used) - i2c_bit_del_bus(&cinfo->alpine_ops); + i2c_bit_del_bus(&cinfo->cirrus_ops); #endif switch_monitor (cinfo, 0); diff -puN drivers/video/Kconfig~cirrus-logic-framebuffer-i2c-support-update drivers/video/Kconfig --- a/drivers/video/Kconfig~cirrus-logic-framebuffer-i2c-support-update +++ a/drivers/video/Kconfig @@ -138,10 +138,11 @@ config FB_CIRRUS before you next recompile the kernel. config FB_CIRRUS_I2C - bool "Enable I2C adapter driver" - depends on FB_CIRRUS + bool "Enable Cirrus Logic I2C support" + depends on FB_CIRRUS && I2C && I2C_ALGOBIT help - This enables I2C support for Cirrus Logic boards. + This enables I2C support for Cirrus Logic boards. Currently only + Alpine chips (CL-GD543x and 544x) are supported. config FB_PM2 tristate "Permedia2 support" diff -puN include/linux/i2c-id.h~cirrus-logic-framebuffer-i2c-support-update include/linux/i2c-id.h --- a/include/linux/i2c-id.h~cirrus-logic-framebuffer-i2c-support-update +++ a/include/linux/i2c-id.h @@ -193,6 +193,7 @@ #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ +#define I2C_HW_B_CIRRUS 0x010022 /* Cirrus Logic framebuffer driver */ /* --- PCF 8584 based algorithms */ #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ _ Patches currently in -mm which might be from khc@xxxxxxxxx are cirrus-logic-framebuffer-i2c-support.patch cirrus-logic-framebuffer-i2c-support-fix.patch cirrus-logic-framebuffer-i2c-support-update.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html