diff options
author | Eric Anholt <eric@anholt.net> | 2007-10-01 13:45:09 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-10-01 13:48:48 -0700 |
commit | 29d3188ee9676f697f6fcb859c7f680f5df30318 (patch) | |
tree | 4108bc0a18bde800687492a0abef775c114263ec /src/tfp410 | |
parent | 6dd8228a386334d05836353672aae9f8c456e435 (diff) |
Suppress I2C failure error messages during DVO device detection.
Otherwise, errors would be printed for every chip probed which wasn't present
on the system.
Diffstat (limited to 'src/tfp410')
-rw-r--r-- | src/tfp410/tfp410.c | 18 | ||||
-rw-r--r-- | src/tfp410/tfp410_reg.h | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/tfp410/tfp410.c b/src/tfp410/tfp410.c index fecb64c8..bc0ad749 100644 --- a/src/tfp410/tfp410.c +++ b/src/tfp410/tfp410.c @@ -48,9 +48,11 @@ static Bool tfp410ReadByte(TFP410Ptr tfp, int addr, CARD8 *ch) { if (!xf86I2CReadByte(&(tfp->d), addr, ch)) { - xf86DrvMsg(tfp->d.pI2CBus->scrnIndex, X_ERROR, - "Unable to read from %s Slave %d.\n", - tfp->d.pI2CBus->BusName, tfp->d.SlaveAddr); + if (!tfp->quiet) { + xf86DrvMsg(tfp->d.pI2CBus->scrnIndex, X_ERROR, + "Unable to read from %s Slave %d.\n", + tfp->d.pI2CBus->BusName, tfp->d.SlaveAddr); + } return FALSE; } return TRUE; @@ -60,9 +62,11 @@ static Bool tfp410WriteByte(TFP410Ptr tfp, int addr, CARD8 ch) { if (!xf86I2CWriteByte(&(tfp->d), addr, ch)) { - xf86DrvMsg(tfp->d.pI2CBus->scrnIndex, X_ERROR, - "Unable to write to %s Slave %d.\n", - tfp->d.pI2CBus->BusName, tfp->d.SlaveAddr); + if (!tfp->quiet) { + xf86DrvMsg(tfp->d.pI2CBus->scrnIndex, X_ERROR, + "Unable to write to %s Slave %d.\n", + tfp->d.pI2CBus->BusName, tfp->d.SlaveAddr); + } return FALSE; } return TRUE; @@ -103,6 +107,7 @@ tfp410_init(I2CBusPtr b, I2CSlaveAddr addr) tfp->d.AcknTimeout = b->AcknTimeout; tfp->d.ByteTimeout = b->ByteTimeout; tfp->d.DriverPrivate.ptr = tfp; + tfp->quiet = TRUE; if ((id = tfp410GetID(tfp, TFP410_VID_LO)) != TFP410_VID) { xf86DrvMsg(tfp->d.pI2CBus->scrnIndex, X_ERROR, @@ -117,6 +122,7 @@ tfp410_init(I2CBusPtr b, I2CSlaveAddr addr) id, tfp->d.pI2CBus->BusName, tfp->d.SlaveAddr); goto out; } + tfp->quiet = FALSE; if (!xf86I2CDevInit(&(tfp->d))) { goto out; diff --git a/src/tfp410/tfp410_reg.h b/src/tfp410/tfp410_reg.h index 45afa9b0..c555b977 100644 --- a/src/tfp410/tfp410_reg.h +++ b/src/tfp410/tfp410_reg.h @@ -95,6 +95,8 @@ typedef struct _TFP410SaveRec { typedef struct { I2CDevRec d; + Bool quiet; + TFP410SaveRec SavedReg; TFP410SaveRec ModeReg; } TFP410Rec, *TFP410Ptr; |