Re: ADT7467

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

 



By the way, the evaluation board attached to the motherboard through PCI bus.

-Dong

Dong Li <dragonicebox at yahoo.com.cn> written? Date: Tue, 3 Jul 2007 01:30:24 +0800 (CST)
Sender: Dong Li <dragonicebox at yahoo.com.cn>
Receiver: lm-sensors at lm-sensors.org
Title:  ADT7467

 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







           

---------------------------------
 _______________________________________________
lm-sensors mailing list
lm-sensors at lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

       
---------------------------------
????????3.5G???20M??? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070703/5eb88841/attachment.html 
-------------- next part --------------
_______________________________________________
lm-sensors mailing list
lm-sensors at lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


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

  Powered by Linux