summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-07-29 01:05:35 +0300
committerGeorge Sapountzis <gsap7@yahoo.gr>2006-07-29 01:05:35 +0300
commitdc1e289a611a17090e6dc7ae8a8d3f26d20df4eb (patch)
tree4f58db2e4ba78b9d6030dbf008fc4b7434c2f08b
parentb377f403e0cd5253402ef3945e5944d1a2763a94 (diff)
Bug #6623: Fix I2C bus Mach64 initialisation failure.
-rw-r--r--src/atii2c.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/atii2c.c b/src/atii2c.c
index cb7bc046..35de71ff 100644
--- a/src/atii2c.c
+++ b/src/atii2c.c
@@ -117,21 +117,22 @@
/*
- * ATII2CAddress --
+ * ATII2CStart --
*
- * This function puts a Start bit and an 8-bit address on the I2C bus.
+ * This function puts a start signal on the I2C bus.
*/
static Bool
-ATII2CAddress
+ATII2CStart
(
- I2CDevPtr pI2CDev,
- I2CSlaveAddr Address
+ I2CBusPtr pI2CBus,
+ int timeout
)
{
- I2CBusPtr pI2CBus = pI2CDev->pI2CBus;
ATII2CPtr pATII2C = pI2CBus->DriverPrivate.ptr;
ATIPtr pATI = pATII2C->pATI;
+ (void)timeout;
+
/*
* Set I2C line directions to out-bound. SCL will remain out-bound until
* next I2C Stop.
@@ -148,6 +149,23 @@ ATII2CAddress
ATII2CSDABitOff;
ATII2CSCLBitOff;
+ return TRUE;
+}
+
+/*
+ * ATII2CAddress --
+ *
+ * This function puts an 8-bit address on the I2C bus.
+ */
+static Bool
+ATII2CAddress
+(
+ I2CDevPtr pI2CDev,
+ I2CSlaveAddr Address
+)
+{
+ I2CBusPtr pI2CBus = pI2CDev->pI2CBus;
+
/* Send low byte of device address */
if ((*pI2CBus->I2CPutByte)(pI2CDev, (I2CByte)Address))
{
@@ -318,6 +336,7 @@ ATICreateI2CBusRec
pI2CBus->scrnIndex = iScreen;
pI2CBus->I2CAddress = ATII2CAddress;
+ pI2CBus->I2CStart = ATII2CStart;
pI2CBus->I2CStop = ATII2CStop;
pI2CBus->I2CPutByte = ATII2CPutByte;
pI2CBus->I2CGetByte = ATII2CGetByte;