[PATCH] hwmon: (it87) Add support for the ITE IT8720F Bug: #357766

David Partington david at partington.com
Fri Feb 26 17:40:51 UTC 2010


Kernel team:


I have a Biostar motherboard with the it8716 superio device.  When I 
execute the sensors hardware monitor the VID values is incorrect,  In 
reviewing the it87.c source I fine the following code burst:

126 /* Logical device 7 registers (IT8712F and later) */
127 #define IT87_SIO_GPIO3_REG      0x27
128 #define IT87_SIO_GPIO5_REG      0x29
129 #define IT87_SIO_PINX2_REG      0x2c    /* Pin selection */
130 #define IT87_SIO_VID_REG        0xfc    /* VID value */



161 /* The IT8718F and IT8720F have the VID value in a different 
register, in
162    Super-I/O configuration space. */
163 #define IT87_REG_VID           0x0a


The current logic is as follows:


1061
1062                 if ((sio_data->type == it8718 || sio_data->type == 
it8720)
1063                  && !(sio_data->skip_vid))
1064                         sio_data->vid_value = 
superio_inb(IT87_SIO_VID_REG);
1065



1559                 /* The 8705 does not have VID capability.
1560                    The 8718 and the 8720 don't use IT87_REG_VID for the
1561                    same purpose. */
1562                 if (data->type == it8712 || data->type == it8716) {
1563                         data->vid = it87_read_value(data, 
IT87_REG_VID);
1564                         /* The older IT8712F revisions had only 5 
VID pins,
1565                            but we assume it is always safe to read 
6 bits. */
1566                         data->vid &= 0x3f;
1567                 }


Based upon the definitions, the two sections of code above are incorrect 
and should be:


1061
1062                 if ((sio_data->type == it8718 || sio_data->type == 
it8720)
1063                  && !(sio_data->skip_vid))
1064                         sio_data->vid_value = 
superio_inb(IT87_REG_VID);
1065



1559                 /* The 8705 does not have VID capability.
1560                    The 8718 and the 8720 don't use IT87_REG_VID for the
1561                    same purpose. */
1562                 if (data->type == it8712 || data->type == it8716) {
1563                         data->vid = it87_read_value(data, 
IT87_SIO_VID_REG);
1564                         /* The older IT8712F revisions had only 5 
VID pins,
1565                            but we assume it is always safe to read 
6 bits. */
1566                         data->vid &= 0x3f;
1567                 }


Regards, David Partington






More information about the kernel-team mailing list