pc87360 and individual alarm files

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

 



Jean Delvare wrote:
> Hi Jim,
>
> On Wed, 05 Mar 2008 15:25:27 -0700, Jim Cromie wrote:
>   
>> Jean Delvare wrote:
>>     
>>> Hi Jim,
>>>
>>> According to my records, all the hardware monitoring drivers have now
>>> been updated to implement individual alarm files, except pc87360. I
>>> know that you had been working on this several months ago. Do you have
>>> an updated patch that I could review?
>>>
>>> Thanks,
>>>   
>>>       
>> Hi Jean,
>>
>> Given enough time, I can do (and presuming I can eventually fix the NFS
>> issue, test) the pc87360 conversion, are you ok with my constraints ?
>>     
>
> Totally fine with me, I don't have time to work on it myself, and no
> test hardware, so even if it takes some time, your help is very
> appreciated.
>
>   
Hi Jean, everyone,

Ok, 3 months later, I have something.

0001-Add-CHAN_-constants-to-support-ALM_-MIN-MAX-CRIT-s.patch
0002-Add-vin-min-max-alarm-sysfs-file-decls-and-callbacks.patch
0003-Add-separate-tempX_min-max-crit_alarm-sysfs-files.patch  
0004-add-LDNI_MAX-constant-for-3-Logical-Devices-we-handl.patch
0005-Add-dev_dbg-calls-to-show-status-regs-at-module-lo.patch  


The in-min/max-alarms work
- setting in-max above and below in-input affects in-max-alarm as expected
- when exceeding threshold, turns on at next read
- returning to inrange, alarm clears after 1 read
- curiously, chip cannot report in-min-alarm when the in-max-alarm is 
set - good its not opposite


For some reason, Temp alarm files dont work,

- /usr/bin/sensors still does, I surmise it must be setting alarms itself

        with last patch, and DEBUG turned on, it looks like this

modprobe pc87360 init=2
[90034.705704] pc87360: Device 0x09 not activated
[90034.722795] pc87360 pc87360.26144: Using external reference voltage
[90034.763100] pc87360 pc87360.26144: VLM conversion set to 1s period, 
160us delay
[90034.792157] pc87360 pc87360.26144: bios vin/temp 0 status:0x91
[90034.808967] pc87360 pc87360.26144: bios vin/temp 1 status:0x91
[90034.828156] pc87360 pc87360.26144: bios vin/temp 2 status:0x91
[90034.851950] pc87360 pc87360.26144: bios vin/temp 3 status:0x91
[90034.874978] pc87360 pc87360.26144: bios vin/temp 4 status:0x91
[90034.888154] pc87360 pc87360.26144: bios vin/temp 5 status:0x91
[90034.904685] pc87360 pc87360.26144: bios vin/temp 6 status:0x91
[90034.920169] pc87360 pc87360.26144: bios vin/temp 7 status:0x91
[90034.948144] pc87360 pc87360.26144: bios vin/temp 8 status:0x93
[90034.968163] pc87360 pc87360.26144: bios vin/temp 9 status:0x00
[90034.982814] pc87360 pc87360.26144: bios vin/temp 10 status:0x91
[90035.000154] pc87360 pc87360.26144: bios temp11_status:0x00 thermistors:0
[90035.034434] pc87360 pc87360.26144: bios temp12_status:0x00 thermistors:0
[90035.043426] pc87360 pc87360.26144: bios temp13_status:0x00 thermistors:0
[90035.055799] pc87360 pc87360.26144: bios temp0_status:0xcd
[90035.067988] pc87360 pc87360.26144: bios temp1_status:0xcd
[90035.121408] pc87360 pc87360.26144: bios temp2_status:0x8d
[90035.132146] pc87360 pc87360.26144: bios vin-cfg:0x02
[90035.140150] pc87360 pc87360.26144: bios temp-cfg:0x02
soekris:~#

I suspect this might be due to the status for temp0-2, the CHAN_ALM_ENA 
bit is not set.
That said, it didnt work when I tried it ( patch held back cuz of this )

The patches elicit minor complaints from checkpatch; no signoff, lines 
over 80 chars.
Some of these can be fixed by editing the patches, but :

- might get rejected on bad index vs contents
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 9b462bb..8f13bed 100644

-  submitting (modded) diffs feels wrong - it means Im testing slightly 
different code,
Or it requires me to create another branch and apply the series there ( 
git-format-patch makes > diffs easy )

So whats the most efficient way to do things in this brave new git world ?
- start a new branch,
- apply each patch one at a time, then do requested mods and commit,

I did 1 lap of cleanup like this already, I tried git rebase interactively,
but ended up using git cherry-pick to replay the useful patches after 
consulting a saved git-log


Anyway..


[jimc at harpo linux-2.6]$ git log --stat
commit 0f23f42ec15cccd02011b6f80ea7466ce6e60f73
Author: Jim Cromie <jim.cromie at gmail.com>
Date:   Wed Jun 18 00:17:55 2008 -0600

    Add dev_dbg() calls to show status regs at module load.
   
    Channel status register values may be set by chip specifications,
    set again by bios, or by this previously loaded driver.
    My bios (soekris 4801, with TinyBIOS I think) sets CHAN_ALM_ENA
    on vin channels, but not on temp channels.

 drivers/hwmon/pc87360.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

commit 51bbd9b8116021dcd6a5c4b204efa46319ddab2a
Author: Jim Cromie <jim.cromie at gmail.com>
Date:   Sun Jun 15 09:22:35 2008 -0600

    add LDNI_MAX constant for 3 Logical Devices we handle
   
    Driver handles 3 logical units, make that a little clearer.

 drivers/hwmon/pc87360.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

commit dcf9aeb53c4fdb08d3f9744911b552b18047edca
Author: Jim Cromie <jim.cromie at gmail.com>
Date:   Tue Jun 17 23:22:05 2008 -0600

    Add separate tempX_min/max/crit_alarm sysfs-files
   
    Add sysfs-files and callbacks for temp-min/max/crit-alarms
    and temp-faults.

 drivers/hwmon/pc87360.c |   82 
+++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 79 insertions(+), 3 deletions(-)

commit ec7741290d780195d04bfde0840680ca6def8abc
Author: Jim Cromie <jim.cromie at gmail.com>
Date:   Tue Jun 17 22:21:58 2008 -0600

    Add vin-min/max-alarm sysfs-file decls and callbacks

 drivers/hwmon/pc87360.c |   52 
++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

commit dcc726a8356bf76ab666d3e86a7fe3bddb2a4dfa
Author: Jim Cromie <jim.cromie at gmail.com>
Date:   Tue Jun 17 21:59:09 2008 -0600

    Add CHAN_* constants to support ALM_(MIN|MAX|CRIT) sys-files
   
    2 different kinds of constants added:
    - CHAN_ALM_* constants for (later) vin, temp alarm callbacks.
    - CHAN_* conversion constants, used in _init_device, partly for RW1C 
bits

 drivers/hwmon/pc87360.c |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

commit c8988f968240069aeae16d8cf9f59096a085eb27
Merge: 10acaf0... 732a675...
Author: Linus Torvalds <torvalds at linux-foundation.org>
Date:   Mon Jun 16 11:52:43 2008 -0700

    Merge branch 'release' of 
git://git.kernel.org/pub/scm/linux/kernel/git/aegl
   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CHAN_-constants-to-support-ALM_-MIN-MAX-CRIT-s.patch
Type: text/x-patch
Size: 5451 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20080619/b19b0a46/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-vin-min-max-alarm-sysfs-file-decls-and-callbacks.patch
Type: text/x-patch
Size: 3484 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20080619/b19b0a46/attachment-0001.bin 


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

  Powered by Linux