ADT7467

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I installed an ADT7467 evaluation board on my motherboard. The sensors-detect (lm-sensor 10.3) can detect it in my system (linux kernel 2.6.21).

***********************************************************
Driver 'to-be-written' (should be inserted)
Detects correctly
* Bus ''SMBUS PIIX4 adapter at 0500"
  Busdriver 'i2c-piix4', I2C address 0x2e
  Chip 'Analog Device ADT7467 or ADT7468' (Confidence:7)

*************************************************************
However when I run the sensors-detect again, it can't detect the ADT7467 any more. Only after I reboot the system and run sensors-detect, it can detect it again.

Any comment here?

In addition, I wrote a simple program to read the company info from the ADT7467 chip.

*************************************************************
  file = open_i2c_dev(i2cbus, filename, 0);    /* i2cbus=0. Only one i2c device*/
  if (file < 0) {
    exit(1);
  }
  /* check adapter functionality */
  if (ioctl(file, I2C_FUNCS, &funcs) < 0) {
    fprintf(stderr, "Error: Could not get the adapter "
        "functionality matrix: %s\n", strerror(errno));
    exit(1);
  }
  /* specify with what device address you want to communicate */
  if (ioctl(file,I2C_SLAVE,address) < 0) {   /*address is 0x2e*/
    if(errno == EBUSY)
      fprintf(stderr, "Device busy?... Try later\n");
    else
      fprintf(stderr, "Error: Could not set address to %d: %s\n",
                        address, strerror(errno));
    exit(1);
  }

 company = i2c_smbus_read_byte_data(file, ADT7467_REG_COMPANY);
  verstep = i2c_smbus_read_byte_data(file, ADT7467_REG_VERSTEP);

  if( company == ADT7467_COMPANY_ANALOG_DEV
        && (verstep == ADT7467_VERSTEP_2 || verstep ==         
        ADT7467_VERSTEP_1))
  printf("Okey. It looks like a ADT7467\n");
*************************************************************

The result is like
i2c_adapter i2c-0: Failed! (01)
i2c_adapter i2c-0: Failed! (01)

i2c_smbus_read_byte_data returns -1. It seems i2c transaction failed.

Any comments here?

Thank you.

-Dong








       
---------------------------------
????????3.5G???20M??? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070703/8a16851f/attachment.html 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux