/*
* Write value to register.
*/
- if (i2c_write(sensor, reg, 1, data, 1) != 0)
+ if (i2c_write(sensor, reg, 1, &data, 1) != 0)
return 1;
return 0;
#define DTT_MANU 0x3e
#define DTT_REV 0x3f
+#define DTT_CONFIG 0x40
#define DTT_ADR 0x48
static int _dtt_init(int sensor)
if (dtt_write (sensor, DTT_CONFIG, 0x01) < 0)
return 1;
+ /* The LM81 needs 400ms to get the correct values ... */
+ udelay (400000);
man = dtt_read (sensor, DTT_MANU);
if (man != 0x01)
return 1;
return 1;
printf ("DTT: Found LM81@%x Rev: %d\n", adr, rev);
- /* The LM81 needs 400ms to get the correct values ... */
- udelay (400000);
return 0;
} /* _dtt_init() */