Re: I2c Detect Function for Teutates HWMon

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

 



Hey Guenter!

Thanks for your hints!

So the registers now have the content 0x17,0x34,0x54 as 0x1734 is Fujitsu Technology Solutions's PCI Id and the 0x54 is for Teutates. 
Sadly we couldn't take registers above 0x80 as they are potentially paged and that would need a i2c-write. So they are 0x0c-0x0e now.
The version is already there. It's called revision and used in the detect function. 

Hope thats sufficient!

Cheers,
Thilo

On Mi, 2016-08-10 at 21:52 -0700, Guenter Roeck wrote:
> On 08/10/2016 12:08 AM, thilo.cestonaro@xxxxxxxxxxxxxx wrote:
> > 
> > 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?
> > 
> 
> Registers should have different values. One or two should reflect a Fujitsu manufacturer Id,
> one should reflect the device Id. 4 bit for the device is a bit limited; I would prefer device
> and version in separate registers. It would also be great if you could use common
> manufacturer/device ID registers (such as 0xfd for the device ID and 0xfe/0xff for the
> manufacturer ID).
> 
> I see that 0x10CF is used as Fujitsu PCI Id. Unless Fujitsu has a well defined I2C
> Manufacturer Id, maybe you could use that in two registers (0xfe/0xff).
> 
> Thanks,
> Guenter
> 
> > 
> > > 
> > > > 
> > > > +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