Patchwork hwmon: (it87) Add support for the ITE IT8720F Bug: #357766

login
register
mail settings
Submitter David Partington
Date March 2, 2010, 6:19 p.m.
Message ID <4B8D569E.9080108@partington.com>
Download mbox | patch
Permalink /patch/46801/
State Superseded
Delegated to: Andy Whitcroft
Headers show

Comments

David Partington - March 2, 2010, 6:19 p.m.
On 03/02/2010 07:58 AM, Stefan Bader wrote:
> David Partington wrote:
>    
>> Tim Gardner wrote:
>>      
>>> David Partington wrote:
>>>
>>>        
>>>> Tim Gardner wrote:
>>>>
>>>>          
>>>>> David Partington wrote:
>>>>>
>>>>>
>>>>>            
>>>>>> 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:
>>>>>>
>>>>>>
>>>>>>              
>>>>> <snip>
>>>>>
>>>>> Well, you've gotten this far. How about a proper patch?
>>>>>
>>>>>
>>>>>            
>>>> Tim,
>>>>
>>>> Thanks for your reply.  Actually in the code submitted at the bottom of
>>>> my email was the suggested change.  However, I did submit an actual
>>>> defect report with the suggested fix as well.  Please see new defect
>>>> #528741.
>>>>
>>>> Regards, David
>>>>
>>>>
>>>>          
>>> The code at the bottom of
>>> https://lists.ubuntu.com/archives/kernel-team/2010-February/009082.html
>>> is not a proper patch wrt the Linux kernel ecosystem. See
>>> Documentation/SubmittingPatches in Linus' kernel tree at
>>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git.
>>>
>>> The advantage of using diff and patch is the avoidance of transcription
>>> errors when applying patches.
>>>
>>> rtg
>>>
>>>        
>> Okay.
>>
>> I have never submitted a kernel patch before - so you are correct, I
>> probably did not follow a recommended procedure.  I thought that rather
>> than complaining about something that does not work, I endeavored to
>> show how to fix the issue.
>>
>> Regards, David
>>
>>      
> Hi David,
>
> the issue is not so much that you did not follow a procedure, but that you can
> help greatly by doing it to get the fix taken forward without needing too much
> time and being prone to errors.
> If you for the approach have a copy of the file as it is now and one copy of it
> as it should be, then a diff -up<old file>  <new file>  >mypatch.patch gives you
> a file which can be taken an used to make the exact same changes as you did.
> Following a textual description, it is just too easy to get things wrong.
>
> Cheers,
> Stefan
>
>    
Stephan,

Thanks for your reply.  I certainly do want to help as much as possible 
and save time for the team.

Per your suggestion I created a diff file to show the suggested 
changes.  This diff file is attached.

Regards, David

Patch

--- it87.c-old	2010-03-02 11:56:04.095882165 -0600
+++ it87.c-new	2010-03-02 12:04:07.837135796 -0600
@@ -1061,7 +1061,7 @@ 
 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);
+1064                         sio_data->vid_value = superio_inb(IT87_REG_VID);
 1065 
 1066                 reg = superio_inb(IT87_SIO_PINX2_REG);
 1067                 if (reg & (1 << 0))
@@ -1557,10 +1557,10 @@ 
 1557 
 1558                 data->sensor = it87_read_value(data, IT87_REG_TEMP_ENABLE);
 1559                 /* The 8705 does not have VID capability.
-1560                    The 8718 and the 8720 don't use IT87_REG_VID for the
+1560                    The 8718 and the 8720 don't use IT87_SIO_VID_REG for the
 1561                    same purpose. */
 1562                 if (data->type == it8712 || data->type == it8716) {
-1563                         data->vid = it87_read_value(data, IT87_REG_VID);
+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;