summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-01 16:23:30 -0700
committerEric Anholt <eric@anholt.net>2007-10-01 16:23:30 -0700
commit263d48ad93a0fb7100729d0c6e0443797c20c80a (patch)
treea357b5f96eba8ae8b6cbd159ca8a70b94a37f048
parent219354af212c7b68c20df689692c55331e36a705 (diff)
Fix probing of the sample CH7017 device I found by allowing GPIO overrides.
It may be that the LVDS chips need to be DVOA and GPIOB only on mobility devices with them, and DVOC/GPIOE on non-mobility like this 845. But until more examples are found, just make this one device probe.
-rw-r--r--src/i830.h1
-rw-r--r--src/i830_dvo.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/src/i830.h b/src/i830.h
index b1f1f68f..0a4b4a7b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -221,6 +221,7 @@ struct _I830DVODriver {
char *modulename;
char *fntablename;
unsigned int dvo_reg;
+ uint32_t gpio;
int address;
const char **symbols;
I830I2CVidOutputRec *vid_rec;
diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index 8ba38bdb..e6ff6af6 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -99,9 +99,10 @@ struct _I830DVODriver i830_dvo_drivers[] =
.type = I830_OUTPUT_DVO_LVDS,
.modulename = "ch7017",
.fntablename = "ch7017_methods",
- .dvo_reg = DVOA,
+ .dvo_reg = DVOC,
.address = 0xea,
.symbols = ch7017_symbols,
+ .gpio = GPIOE,
}
};
@@ -430,7 +431,12 @@ i830_dvo_init(ScrnInfoPtr pScrn)
ret_ptr = NULL;
drv->vid_rec = LoaderSymbol(drv->fntablename);
- if (drv->type == I830_OUTPUT_DVO_LVDS)
+ /* Allow the I2C driver info to specify the GPIO to be used in
+ * special cases, but otherwise default to what's defined in the spec.
+ */
+ if (drv->gpio != 0)
+ gpio = drv->gpio;
+ else if (drv->type == I830_OUTPUT_DVO_LVDS)
gpio = GPIOB;
else
gpio = GPIOE;