[patch pc87360 1/N] SENSOR_DEVICE_ATTR rework for voltage attrs

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

 



attached patch (against 13-rc3-mm1) reworks the sysfs attributes
for the voltage sensors (only) in the style of Yani's rework of lm83

the #include is not alphabetical, cuz it needs something in i2c* to be a 
complete type,
I didnt look to see why.  I also didnt move jiffies after i2c*

Im heeding your preference for bite-sized patches.
If this one is/looks ok, Ill move on to the others,
one at a time, unless you want them in bulk.

1st, the reference/control (unpatched 13-rc3-git4)

root at soekris:~# uname -r
2.6.13-rc3-git4-v1
root at soekris:~# sensors -s
pc87366-isa-6620: At least one "set" statement failed
root at soekris:~# sensors
pc87366-isa-6620
Adapter: ISA adapter
avi0:      +3.01 V  (min =  +0.00 V, max =  +3.01 V)
VCORE:     +2.02 V  (min =  +0.00 V, max =  +3.01 V)
VCC:       +5.01 V  (min =  +0.00 V, max =  +6.03 V)
VPWR:     +14.01 V  (min =  +5.93 V, max = +28.02 V)
+12V:     +11.91 V  (min =  +0.00 V, max = +14.46 V)
-12V:     -12.28 V  (min = -60.61 V, max =  -2.76 V)
GND:       +0.00 V  (min =  +0.00 V, max =  +3.01 V)
Vsb:       +3.33 V  (min =  +3.00 V, max =  +3.59 V)
Vdd:       +2.88 V  (min =  +2.79 V, max =  +3.59 V)       ALARM
Vbat:      +3.01 V  (min =  +2.40 V, max =  +3.01 V)
AVdd:      +3.31 V  (min =  +3.00 V, max =  +3.59 V)
Temp:       +109 C  (low  =    +0 C, high =   +70 C)   ALARM
Critical:    +85 C ALARM

now the experiment (rc3-mm1 + the patch)

root at soekris:~# uname -a
Linux soekris 2.6.13-rc3-mm1-v1 #4 Wed Jul 27 21:10:26 MDT 2005 i586 
GNU/Linux
root at soekris:~#
root at soekris:~# sensors -s
pc87366-isa-6620: At least one "set" statement failed
root at soekris:~#
root at soekris:~# sensors
pc87366-isa-6620
Adapter: ISA adapter
avi0:      +3.01 V  (min =  +0.00 V, max =  +3.01 V)
VCORE:     +2.03 V  (min =  +0.00 V, max =  +3.01 V)
VCC:       +5.03 V  (min =  +0.00 V, max =  +6.03 V)
VPWR:     +13.77 V  (min =  +5.93 V, max = +28.02 V)
+12V:     +11.91 V  (min =  +0.00 V, max = +14.46 V)
-12V:     -12.28 V  (min = -60.61 V, max =  -2.76 V)
GND:       +0.00 V  (min =  +0.00 V, max =  +3.01 V)
Vsb:       +3.33 V  (min =  +3.00 V, max =  +3.59 V)
Vdd:       +2.91 V  (min =  +2.79 V, max =  +3.59 V)
Vbat:      +3.01 V  (min =  +2.40 V, max =  +3.01 V)
AVdd:      +3.31 V  (min =  +3.00 V, max =  +3.59 V)
Temp:       +110 C  (low  =    +0 C, high =   +70 C)   ALARM
Critical:    +85 C ALARM


I dont know which set statement is failing, but I twiddled Vdd, and 
changed the alarm state successfully

Vsb:       +3.33 V  (min =  +3.00 V, max =  +3.59 V)
Vdd:       +2.91 V  (min =  +3.00 V, max =  +3.59 V)       ALARM
Vbat:      +3.01 V  (min =  +2.40 V, max =  +3.01 V)

root at soekris:~# grep set /etc/sensors.conf
  set vid       1.235
  set in3_min    6.0
  set in3_max   28.0
        #  avp->scale, (a - avp->offset) * avp->scale + avp->offset,
  set in7_min    3.0
  set in7_max    3.6
  set in8_min    3.0
  set in8_max    3.6
  set in9_min    2.4
  set in9_max    3.6
  set in10_min   3.0
  set in10_max   3.6
  set temp3_min      0
  set temp3_max     70
  set temp3_crit    85

I tried changing  'set vid' line by adding '_max', since its that seemed 
to follow pattern, error changed:
root at soekris:~# sensors -s
Error: Line 6: Unknown feature name
pc87366-isa-6620: No such feature known
Commenting it out fixed the err.


-rw-rw-r--  1 jimc jimc 141784 Jul 28 10:27 drivers/hwmon/pc87360.ko

It doesnt get quite the same objcode savings as looping thru 
device_create_file()s,
but looping cant be done until the address offsets between items are 
guaranteed,
as they are when indexing arrays.  Thats for another day.

ciao
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.lxp-sensor-dev-vin
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050728/82799ec9/attachment.pl 


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

  Powered by Linux