I2c Detect Function for Teutates HWMon

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

 



Hey!

The Firmware developer of the Teutates Chip will implement more "detect"-register so the ftsteutates module can add a i2c detect function.

Would it be sufficient to have 3 register with specific content (0x54,0x54,0x54) plus the Device ID Reg shown below to identify the chip?
Or do you advise another mechanism to identify it?

>> +static int ftsteutates_detect(struct i2c_client *client,
>> +             struct i2c_board_info *info)
>> +{
>> +     int val = ftsteutates_read_byte(client, FTSTEUTATES_DEVICE_ID_REG);
>> +
>> +     /* Baseboard Management Controller */
>> +     if ((val & 0xF0) == 0x10) {
>> +             switch (val & 0x0F) {
>> +             case 0x01:
>> +                     strlcpy(info->type, ftsteutates_id[teutates].name,
>> +                     I2C_NAME_SIZE);
>> +                     info->flags = 0;
>> +                     return 0;
>> +             }
>> +     }
>> +     return -ENODEV;
>> +}
>
>This is not sufficient for a detect function; it would result in many false
>positives. Please drop it unless a much better means to detect the chip
>is available.
>


Cheers,
Thilo

<<attachment: smime.p7s>>


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux