aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/intelfb
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-07-14 16:38:28 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 16:38:28 -0400
commitc1b6b4f2342d073698dfc2547240c35045a1d00e (patch)
tree2aa5024a099e1c4d5a5b4bc0ce5f832d80d6a15e /drivers/video/intelfb
parent0d2b405a628309310b4fc02b26d713b855ad5f68 (diff)
i2c: Let framebuffer drivers set their I2C bus class to DDC
Let framebuffer drivers set their I2C bus class to DDC. Once this is done, we will be able to tell the eeprom driver to only probe for EDID EEPROMs on these buses. Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/video/intelfb')
-rw-r--r--drivers/video/intelfb/intelfb_i2c.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/intelfb/intelfb_i2c.c b/drivers/video/intelfb/intelfb_i2c.c
index ca95f09d8b43..fcf9fadbf572 100644
--- a/drivers/video/intelfb/intelfb_i2c.c
+++ b/drivers/video/intelfb/intelfb_i2c.c
@@ -100,7 +100,8 @@ static int intelfb_gpio_getsda(void *data)
100 100
101static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo, 101static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
102 struct intelfb_i2c_chan *chan, 102 struct intelfb_i2c_chan *chan,
103 const u32 reg, const char *name) 103 const u32 reg, const char *name,
104 int class)
104{ 105{
105 int rc; 106 int rc;
106 107
@@ -108,6 +109,7 @@ static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo,
108 chan->reg = reg; 109 chan->reg = reg;
109 snprintf(chan->adapter.name, sizeof(chan->adapter.name), 110 snprintf(chan->adapter.name, sizeof(chan->adapter.name),
110 "intelfb %s", name); 111 "intelfb %s", name);
112 chan->adapter.class = class;
111 chan->adapter.owner = THIS_MODULE; 113 chan->adapter.owner = THIS_MODULE;
112 chan->adapter.id = I2C_HW_B_INTELFB; 114 chan->adapter.id = I2C_HW_B_INTELFB;
113 chan->adapter.algo_data = &chan->algo; 115 chan->adapter.algo_data = &chan->algo;
@@ -145,7 +147,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
145 147
146 /* setup the DDC bus for analog output */ 148 /* setup the DDC bus for analog output */
147 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA, 149 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA,
148 "CRTDDC_A"); 150 "CRTDDC_A", I2C_CLASS_DDC);
149 i++; 151 i++;
150 152
151 /* need to add the output busses for each device 153 /* need to add the output busses for each device
@@ -159,9 +161,9 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
159 case INTEL_865G: 161 case INTEL_865G:
160 dinfo->output[i].type = INTELFB_OUTPUT_DVO; 162 dinfo->output[i].type = INTELFB_OUTPUT_DVO;
161 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, 163 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus,
162 GPIOD, "DVODDC_D"); 164 GPIOD, "DVODDC_D", I2C_CLASS_DDC);
163 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, 165 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
164 GPIOE, "DVOI2C_E"); 166 GPIOE, "DVOI2C_E", 0);
165 i++; 167 i++;
166 break; 168 break;
167 case INTEL_915G: 169 case INTEL_915G:
@@ -174,7 +176,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
174 /* SDVO ports have a single control bus - 2 devices */ 176 /* SDVO ports have a single control bus - 2 devices */
175 dinfo->output[i].type = INTELFB_OUTPUT_SDVO; 177 dinfo->output[i].type = INTELFB_OUTPUT_SDVO;
176 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, 178 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
177 GPIOE, "SDVOCTRL_E"); 179 GPIOE, "SDVOCTRL_E", 0);
178 /* TODO: initialize the SDVO */ 180 /* TODO: initialize the SDVO */
179 /* I830SDVOInit(pScrn, i, DVOB); */ 181 /* I830SDVOInit(pScrn, i, DVOB); */
180 i++; 182 i++;