intelfb: support 945GME (as used in ASUS Eee 901)
[linux-2.6.git] / drivers / video / intelfb / intelfb_i2c.c
index ca95f09..5d896b8 100644 (file)
@@ -100,7 +100,8 @@ static int intelfb_gpio_getsda(void *data)
 
 static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
                                 struct intelfb_i2c_chan *chan,
-                                const u32 reg, const char *name)
+                                const u32 reg, const char *name,
+                                int class)
 {
        int rc;
 
@@ -108,6 +109,7 @@ static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
        chan->reg                       = reg;
        snprintf(chan->adapter.name, sizeof(chan->adapter.name),
                 "intelfb %s", name);
+       chan->adapter.class             = class;
        chan->adapter.owner             = THIS_MODULE;
        chan->adapter.id                = I2C_HW_B_INTELFB;
        chan->adapter.algo_data         = &chan->algo;
@@ -145,7 +147,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
 
        /* setup the DDC bus for analog output */
        intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA,
-                             "CRTDDC_A");
+                             "CRTDDC_A", I2C_CLASS_DDC);
        i++;
 
        /* need to add the output busses for each device
@@ -159,9 +161,9 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
        case INTEL_865G:
                dinfo->output[i].type = INTELFB_OUTPUT_DVO;
                intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus,
-                                     GPIOD, "DVODDC_D");
+                                     GPIOD, "DVODDC_D", I2C_CLASS_DDC);
                intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
-                                     GPIOE, "DVOI2C_E");
+                                     GPIOE, "DVOI2C_E", 0);
                i++;
                break;
        case INTEL_915G:
@@ -169,12 +171,13 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
                /* has some LVDS + tv-out */
        case INTEL_945G:
        case INTEL_945GM:
+       case INTEL_945GME:
        case INTEL_965G:
        case INTEL_965GM:
                /* SDVO ports have a single control bus - 2 devices */
                dinfo->output[i].type = INTELFB_OUTPUT_SDVO;
                intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
-                                     GPIOE, "SDVOCTRL_E");
+                                     GPIOE, "SDVOCTRL_E", 0);
                /* TODO: initialize the SDVO */
                /* I830SDVOInit(pScrn, i, DVOB); */
                i++;