summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2006-12-18 13:59:17 -0800
committerEric Anholt <eric@anholt.net>2006-12-18 13:59:27 -0800
commit633d718f6fb019844304228a81c84a8605da004f (patch)
tree754f56f99b060df389f0f46dc3e2f3b3242f36e6 /src
parent3167bc6b24bd74c50ca4c4d361b14aa24d77cfa3 (diff)
Clean up a bunch of log noise from ch7xxx startup.
Diffstat (limited to 'src')
-rw-r--r--src/ch7xxx/ch7xxx.c34
-rw-r--r--src/ch7xxx/ch7xxx_reg.h2
2 files changed, 17 insertions, 19 deletions
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
index 5213646b..59722b8f 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -93,10 +93,9 @@ ch7xxx_probe(I2CBusPtr b, I2CSlaveAddr addr)
{
/* this will detect the CH7xxx chip on the specified i2c bus */
struct ch7xxx_priv *dev_priv;
+ CARD8 vendor, device;
unsigned char ch;
- xf86DrvMsg(b->scrnIndex, X_INFO, "detecting ch7xxx\n");
-
dev_priv = xcalloc(1, sizeof(struct ch7xxx_priv));
if (dev_priv == NULL)
return NULL;
@@ -110,29 +109,31 @@ ch7xxx_probe(I2CBusPtr b, I2CSlaveAddr addr)
dev_priv->d.ByteTimeout = b->ByteTimeout;
dev_priv->d.DriverPrivate.ptr = dev_priv;
- if (!ch7xxx_read(dev_priv, CH7xxx_REG_VID, &ch))
+ if (!ch7xxx_read(dev_priv, CH7xxx_REG_VID, &vendor))
goto out;
- ErrorF("VID is %02X", ch);
- if (ch!=(CH7xxx_VID & 0xFF)) {
- xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_ERROR,
- "ch7xxx not detected got %d: from %s Slave %d.\n",
- ch, dev_priv->d.pI2CBus->BusName, dev_priv->d.SlaveAddr);
+ if (vendor != CH7xxx_VID) {
+ xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_INFO,
+ "ch7xxx not detected; got 0x%02x from %s slave %d.\n",
+ vendor, dev_priv->d.pI2CBus->BusName,
+ dev_priv->d.SlaveAddr);
goto out;
}
- if (!ch7xxx_read(dev_priv, CH7xxx_REG_DID, &ch))
+ if (!ch7xxx_read(dev_priv, CH7xxx_REG_DID, &device))
goto out;
- ErrorF("DID is %02X", ch);
- if (ch!=(CH7xxx_DID & 0xFF)) {
- xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_ERROR,
- "ch7xxx not detected got %d: from %s Slave %d.\n",
- ch, dev_priv->d.pI2CBus->BusName, dev_priv->d.SlaveAddr);
+ if (device != CH7xxx_DID) {
+ xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_INFO,
+ "ch7xxx not detected; got 0x%02x from %s slave %d.\n",
+ device, dev_priv->d.pI2CBus->BusName,
+ dev_priv->d.SlaveAddr);
goto out;
}
-
+ xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_INFO,
+ "Detected CH7xxx chipset, vendor/device ID 0x%02x/0x%02x\n",
+ vendor, device);
if (!xf86I2CDevInit(&dev_priv->d)) {
goto out;
@@ -235,9 +236,6 @@ ch7xxx_power(I2CDevPtr d, Bool On)
if (ret == FALSE)
return;
- xf86DrvMsg(dev_priv->d.pI2CBus->scrnIndex, X_ERROR,
- "ch7xxx pm is %02X\n", ch);
-
#if 0
ret = ch7xxx_read(dev_priv, CH7xxx_REG8, &ch);
if (ret)
diff --git a/src/ch7xxx/ch7xxx_reg.h b/src/ch7xxx/ch7xxx_reg.h
index 891fde8b..0a5f1885 100644
--- a/src/ch7xxx/ch7xxx_reg.h
+++ b/src/ch7xxx/ch7xxx_reg.h
@@ -29,7 +29,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define CH7xxx_REG_VID 0x4a
#define CH7xxx_REG_DID 0x4b
-#define CH7011_VID 0x83
+#define CH7011_VID 0x83 /* 7010 as well */
#define CH7009A_VID 0x84
#define CH7009B_VID 0x85
#define CH7301_VID 0x95