adm1026 driver for 2.7.0
Hi,
both these patches add adm1026 support to lm_sensors & i2c release 2.7.0.
TODO :
- Alarms are not yet handled but this is planned for next release ;-)
- sensord not yet changed.
- computation in /etc/sensors.conf not all validated.
sample output :
adm1026-i2c-0-2c
Adapter: SMBus Via Pro adapter at 0500
Algorithm: Non-I2C SMBus adapter
+3.3V SB: +3.34 V (min = +0.00 V, max = +4.39 V) +3.3V MN: +3.37 V (min = +0.00 V, max = +4.39 V) +5V: +5.10 V (min = +0.00 V, max = +6.63 V) Vccp: +1.46 V (min = +0.00 V, max = +3.06 V) +12V: +11.69 V (min = +0.00 V, max = +15.94 V) -12V: -11.04 V (min = -15.93 V, max = +2.69 V) ain0: +0.00 V (min = +0.00 V, max = +2.55 V) ain1: +0.00 V (min = +0.00 V, max = +2.55 V) ain2: +0.00 V (min = +0.00 V, max = +2.55 V) ain3: +0.00 V (min = +0.00 V, max = +2.55 V) ain4: +0.00 V (min = +0.00 V, max = +2.55 V) ain5: +0.00 V (min = +0.00 V, max = +2.55 V) ain6: +2.54 V (min = +0.00 V, max = +2.55 V) ain7: +0.02 V (min = +0.00 V, max = +2.55 V) auxin0: +1.86 V (min = +1.94 V, max = +2.20 V) auxin1: +0.00 V (min = +1.96 V, max = +1.28 V) temp: +31.0?C (min = +0?C, max = +0?C) 0 rtemp1: +22.0?C (min = +10?C, max = +13?C) 0 rtemp2: +12.8?C (min = +10?C, max = +13?C) -1717986918 fan0: 13200 RPM (min = 16500 RPM) fan1: 9078 RPM (min = 14318 RPM) fan2: 8551 RPM (min = 14318 RPM) fan3: 9078 RPM (min = 14318 RPM) fan4: 8551 RPM (min = 14318 RPM) fan5: 8066 RPM (min = 14318 RPM) fan6: 8385 RPM (min = 14318 RPM) fan7: 0 RPM (min = 0 RPM)
Regards
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i2c-2.7.0.diff
Type: text/x-diff
Size: 1688 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030429/3b7a0e94/i2c-2.7.0.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lm_sensors-2.7.0.diff
Type: text/x-diff
Size: 38968 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030429/3b7a0e94/lm_sensors-2.7.0.bin
Thanks,
Unfortunately, we've duplicated our efforts here. I've already written an ADM1026 driver and was about to release it. Did you check the new-drivers page before you started?
Also, your patch does not include the actual chip driver (kernel/chips/adm1026.c). Did you write any documentation or other files that were not included with your patch?
I've attached my patch to 2.7.0. It's also available at:
ftp://ftp.penguincomputing.com/pub/updates/lmsensors/lm_sensors-2.7.0-adm1026-6.patch
Please send me your other driver files and I'll see if you've got something better than my code.
Thanks,
:v)
Quoted 41 lines · Eric BENARD / Free
Hi,
both these patches add adm1026 support to
lm_sensors& i2c release 2.7.0.TODO :
- Alarms are not yet handled but this is planned for next release ;-)
- sensord not yet changed.
- computation in/etc/sensors.confnot all validated.sample output :
adm1026-i2c-0-2c
Adapter: SMBus Via Pro adapter at 0500
Algorithm: Non-I2C SMBus adapter+3.3V SB: +3.34 V (min = +0.00 V, max = +4.39 V) +3.3V MN: +3.37 V (min = +0.00 V, max = +4.39 V) +5V: +5.10 V (min = +0.00 V, max = +6.63 V) Vccp: +1.46 V (min = +0.00 V, max = +3.06 V) +12V: +11.69 V (min = +0.00 V, max = +15.94 V) -12V: -11.04 V (min = -15.93 V, max = +2.69 V) ain0: +0.00 V (min = +0.00 V, max = +2.55 V) ain1: +0.00 V (min = +0.00 V, max = +2.55 V) ain2: +0.00 V (min = +0.00 V, max = +2.55 V) ain3: +0.00 V (min = +0.00 V, max = +2.55 V) ain4: +0.00 V (min = +0.00 V, max = +2.55 V) ain5: +0.00 V (min = +0.00 V, max = +2.55 V) ain6: +2.54 V (min = +0.00 V, max = +2.55 V) ain7: +0.02 V (min = +0.00 V, max = +2.55 V) auxin0: +1.86 V (min = +1.94 V, max = +2.20 V) auxin1: +0.00 V (min = +1.96 V, max = +1.28 V) temp: +31.0?C (min = +0?C, max = +0?C) 0 rtemp1: +22.0?C (min = +10?C, max = +13?C) 0 rtemp2: +12.8?C (min = +10?C, max = +13?C) -1717986918 fan0: 13200 RPM (min = 16500 RPM) fan1: 9078 RPM (min = 14318 RPM) fan2: 8551 RPM (min = 14318 RPM) fan3: 9078 RPM (min = 14318 RPM) fan4: 8551 RPM (min = 14318 RPM) fan5: 8066 RPM (min = 14318 RPM) fan6: 8385 RPM (min = 14318 RPM) fan7: 0 RPM (min = 0 RPM)
Quoted 2 lines
Regards
Eric
-------------- next part --------------
CONTRIBUTORS renamed from _relion1x/lm_sensors-2.7.0/CONTRIBUTORS +2 -0
@@ -83,4 +83,6 @@ * Vojtech Pavlik <[email protected]> Author of the i2c-amd8111 bus driver. Added support for amd8111 SMBus 1.0 controller to i2c-amd756. +* Philip Pokorny <[email protected]> + Author of the ADM1026 driver
README renamed from _relion1x/lm_sensors-2.7.0/README +2 -2
@@ -60,8 +60,8 @@ At least the following hardware sensor chips are supported: - Analog Devices ADM1021, ADM1021A, ADM1022, - ADM1023, ADM1024, ADM1025, and ADM9240 + Analog Devices ADM1021, ADM1021A, ADM1022, ADM1023, + ADM1024, ADM1025, ADM1026 and ADM9240 Asus AS99127F, ASB100 Bach Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780 Hewlett Packard Maxilife (several revisions including '99 NBA)
doc/chips/SUMMARY renamed from _relion1x/lm_sensors-2.7.0/doc/chips/SUMMARY +3 -0
@@ -63,6 +63,9 @@ adm1025 adm1025 2 6 - - yes no +adm1026 + adm1026 3 17 8 2 pwm+dac yes no + adm9240 adm9240 1 6 2 1 dac yes no ds1780 1 6 2 1 dac yes no
doc/chips/adm1026 renamed from _relion1x/lm_sensors-2.7.0/doc/chips/adm1026 +217 -0
217 lines not on this page · raw message
kernel/chips/Module.mk renamed from _relion1x/lm_sensors-2.7.0/kernel/chips/Module.mk +3 -0
@@ -44,6 +44,9 @@ ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1025=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1025.o endif +ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1026=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1026.o +endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM9240=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/adm9240.o endif
kernel/chips/adm1026.c renamed from _relion1x/lm_sensors-2.7.0/kernel/chips/adm1026.c +1679 -0
1,679 lines not on this page · raw message
kernel/include/sensors.h renamed from _relion1x/lm_sensors-2.7.0/kernel/include/sensors.h +81 -0
87 lines not on this page · raw message
lib/chips.c renamed from _relion1x/lm_sensors-2.7.0/lib/chips.c +318 -1
330 lines not on this page · raw message
lib/chips.h renamed from _relion1x/lm_sensors-2.7.0/lib/chips.h +112 -0
118 lines not on this page · raw message
prog/detect/sensors-detect renamed from _relion1x/lm_sensors-2.7.0/prog/detect/sensors-detect +26 -1
@@ -713,7 +713,8 @@ lm87_detect ite_detect ite_isa_detect ite_alias_detect ddcmonitor_detect ds1621_detect adm1024_detect fscpos_detect fscscy_detect pcf8591_detect arp_detect ipmi_kcs_detect - ipmi_smic_detect via8231_isa_detect lm85_detect smartbatt_detect); + ipmi_smic_detect via8231_isa_detect lm85_detect smartbatt_detect + adm1026_detect); # This is a list of all recognized chips. # Each entry must have the following fields:
@@ -896,6 +897,12 @@ i2c_detect => sub { adm9240_detect 2, @_ } }, { + name => "Analog Devices ADM1026", + driver => "adm1026", + i2c_addrs => [0x2c,0x2d,0x2e], + i2c_detect => sub { adm1026_detect 0, @_ } + }, + { name => "Analog Devices ADM1025", driver => "adm1025", i2c_addrs => [0x2c..0x2e],
@@ -2287,6 +2294,24 @@ return (8); } +# $_[0]: Chip to detect (0 = ADM1026) +# $_[1]: A reference to the file descriptor to access this chip. +# We may assume an i2c_set_slave_addr was already done. +# $_[2]: Address +# Returns: undef if not detected, (8) if detected. +# Registers used: +# 0x16: Company ID +# 0x17: Revision +sub adm1026_detect +{ + my $reg; + my ($chip, $file,$addr) = @_; + $reg = i2c_smbus_read_byte_data($file,0x16); + return unless ($reg = 0x41); + return unless (i2c_smbus_read_byte_data($file,0x17) & 0xf0) = 0x40; + return (8); +} + # $_[0]: Chip to detect (0 = ADM1024) # $_[1]: A reference to the file descriptor to access this chip. # We may assume an i2c_set_slave_addr was already done.
prog/sensors/chips.c renamed from _relion1x/lm_sensors-2.7.0/prog/sensors/chips.c +106 -0
112 lines not on this page · raw message
prog/sensors/chips.h renamed from _relion1x/lm_sensors-2.7.0/prog/sensors/chips.h +2 -1
@@ -28,8 +28,9 @@extern void print_mtp008 (const sensors_chip_name *name);extern void print_lm75 (const sensors_chip_name *name);extern void print_adm1021 (const sensors_chip_name *name); -extern void print_adm1025 (const sensors_chip_name *name);extern void print_adm1024 (const sensors_chip_name *name); +extern void print_adm1025 (const sensors_chip_name *name); +extern void print_adm1026 (const sensors_chip_name *name);extern void print_adm9240 (const sensors_chip_name *name);extern void print_lm78 (const sensors_chip_name *name);extern void print_sis5595 (const sensors_chip_name *name);
prog/sensors/main.c renamed from _relion1x/lm_sensors-2.7.0/prog/sensors/main.c +2 -0
@@ -359,6 +359,8 @@print_vt8231 (&name); else if (!strcmp(name.prefix,"bmc"))print_bmc (&name); + else if (!strcmp(name.prefix,"adm1026")) +print_adm1026 (&name); else print_unknown_chip(&name);printf ("\n" );