Commit 54807fc0 authored by Justin Thiessen's avatar Justin Thiessen Committed by Greg Kroah-Hartman

[PATCH] I2C: add adm1026 chip driver

Here is the revised adm1026 driver port for kernel 2.6.10-rc2.  It takes into
account Jean Delvare's and Mark Hoffman's comments and recommendations, and
provides pretty much the entire feature set of the 2.4.X kernel driver, but
in (hopefully) a manner compliant with the standards for the 2.6.X kernel
lm_sensors drivers.

As discussed in previous messages, control over the pwm output is provided
via:

pwm[1-3]                  {0-255}
pwm[1-3]_enable           {0-2}  (off, manual, automatic fan control)

Note that there is really only one pwm register and one enable bit.  pwm[2-3]
and pwm[2-3]_enable are provided for the sake of a chip-indpendent interface,
and are simply RW mirrors of pwm1 and pwm1_enable, respectively.

Access to the DAC is provided via:

analog_out            {0-2500} (millivolts)

No way is currently provided to turn on DAC-mediated automatic fan control.
See my previous email in this thread for the reasons why.

Control over automatic fan "on" temperatures are provided by:

temp[1-3]_auto_point1_temp     {-128000 - 127000}

Hardware-determined hysteresis and range values are revealed in:

temp[1-3]_auto_point1_temp_hyst   {temp[1-3]_auto_point1_temp - 6000}
temp[1-3]_auto_point2_temp        {temp[1-3]_auto_point1_temp + 20000}

Failsafe critical temperatures at which the fans go to maximum speed are
controled via:

temp[1-3]_crit_enable       {0-1}                 (off, on)
temp[1-3]_crit              {-128000 - 127000}

Again, there is really only one "enable critical-temperature-fan-maximization"
bit.  temp[2-3]_crit_enable are simply RW mirrors of temp1_crit_enable

These values override any values set for the pwm-mediated automatic fan
control.

VRM is now set via Rudolf Marek's functions.  VID is read from the assumed
correct set of pins (GPIO11-GPIO15), and no longer a user-writable field.

In keeping with Greg KH's changes,

normal_i2c_range
normal_isa_range

have been removed,

and

normal_i2c

has been updated to enumerate all addresses.  (Just adding 0x2d)

Finally, the val-comparison-before-assignment bug has been corrected.
Signed-off-by: default avatarJustin Thiessen <jthiessen@penguincomputing.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 0e16195b
......@@ -32,6 +32,15 @@ config SENSORS_ADM1025
This driver can also be built as a module. If so, the module
will be called adm1025.
config SENSORS_ADM1026
tristate "Analog Devices ADM1026 and compatibles"
depends on I2C && EXPERIMENTAL
select I2C_SENSOR
help
If you say yes here you get support for Analog Devices ADM1026
This driver can also be built as a module. If so, the module
will be called adm1026.
config SENSORS_ADM1031
tristate "Analog Devices ADM1031 and compatibles"
depends on I2C && EXPERIMENTAL
......
......@@ -9,6 +9,7 @@ obj-$(CONFIG_SENSORS_W83781D) += w83781d.o
obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o
obj-$(CONFIG_SENSORS_ADM1025) += adm1025.o
obj-$(CONFIG_SENSORS_ADM1026) += adm1026.o
obj-$(CONFIG_SENSORS_ADM1031) += adm1031.o
obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment