Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/hwmon-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/hwmon-2.6:
  hwmon: Fix debug messages in w83781d
  hwmon: Let w83781d and lm78 load again
  w83627ehf: Fix the detection of fan5
  k8temp: Documentation update
  smsc47m1: List the SMSC LPC47M112 as supported
  hwmon: Fix documentation typos
  adm9240: Update Grant Coady's email address
  w83791d: Fix unchecked return status
  • Loading branch information
Linus Torvalds committed Oct 19, 2006
2 parents 17e6c60 + bd452e6 commit 64d9a39
Show file tree
Hide file tree
Showing 14 changed files with 124 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Documentation/hwmon/adm9240
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Authors:
Frodo Looijaard <[email protected]>,
Philip Edelbrock <[email protected]>,
Michiel Rook <[email protected]>,
Grant Coady <[email protected]> with guidance
Grant Coady <gcoady.lk@gmail.com> with guidance
from Jean Delvare <[email protected]>

Interface
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/f71805f
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Thanks to Kris Chen from Fintek for answering technical questions and
providing additional documentation.

Thanks to Chris Lin from Jetway for providing wiring schematics and
anwsering technical questions.
answering technical questions.


Description
Expand Down
13 changes: 8 additions & 5 deletions Documentation/hwmon/k8temp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Kernel driver k8temp
====================

Supported chips:
* AMD K8 CPU
* AMD Athlon64/FX or Opteron CPUs
Prefix: 'k8temp'
Addresses scanned: PCI space
Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf
Expand All @@ -13,10 +13,13 @@ Contact: Rudolf Marek <[email protected]>
Description
-----------

This driver permits reading temperature sensor(s) embedded inside AMD K8 CPUs.
Official documentation says that it works from revision F of K8 core, but
in fact it seems to be implemented for all revisions of K8 except the first
two revisions (SH-B0 and SH-B3).
This driver permits reading temperature sensor(s) embedded inside AMD K8
family CPUs (Athlon64/FX, Opteron). Official documentation says that it works
from revision F of K8 core, but in fact it seems to be implemented for all
revisions of K8 except the first two revisions (SH-B0 and SH-B3).

Please note that you will need at least lm-sensors 2.10.1 for proper userspace
support.

There can be up to four temperature sensors inside single CPU. The driver
will auto-detect the sensors and will display only temperatures from
Expand Down
4 changes: 3 additions & 1 deletion Documentation/hwmon/smsc47m1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ Kernel driver smsc47m1
======================

Supported chips:
* SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x and LPC47M192
* SMSC LPC47B27x, LPC47M112, LPC47M10x, LPC47M13x, LPC47M14x,
LPC47M15x and LPC47M192
Addresses scanned: none, address read from Super I/O config space
Prefix: 'smsc47m1'
Datasheets:
http://www.smsc.com/main/datasheets/47b27x.pdf
http://www.smsc.com/main/datasheets/47m10x.pdf
http://www.smsc.com/main/datasheets/47m112.pdf
http://www.smsc.com/main/tools/discontinued/47m13x.pdf
http://www.smsc.com/main/datasheets/47m14x.pdf
http://www.smsc.com/main/tools/discontinued/47m15x.pdf
Expand Down
6 changes: 3 additions & 3 deletions Documentation/hwmon/w83627ehf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fan control mode).
Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
the temperature gets higher than high limit; it stays on until the temperature
falls below the Hysteresis value.
falls below the hysteresis value.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
Expand Down Expand Up @@ -67,9 +67,9 @@ Thermal Cruise mode

If the temperature is in the range defined by:

pwm[1-4]_target - set target temperature, unit millidegree Celcius
pwm[1-4]_target - set target temperature, unit millidegree Celsius
(range 0 - 127000)
pwm[1-4]_tolerance - tolerance, unit millidegree Celcius (range 0 - 15000)
pwm[1-4]_tolerance - tolerance, unit millidegree Celsius (range 0 - 15000)

there are no changes to fan speed. Once the temperature leaves the interval,
fan speed increases (temp is higher) or decreases if lower than desired.
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,12 @@ M: [email protected], [email protected]
L: [email protected]
S: Maintained

K8TEMP HARDWARE MONITORING DRIVER
P: Rudolf Marek
M: [email protected]
L: [email protected]
S: Maintained

KCONFIG
P: Roman Zippel
M: [email protected]
Expand Down
10 changes: 6 additions & 4 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ config SENSORS_ADM9240
will be called adm9240.

config SENSORS_K8TEMP
tristate "AMD K8 processor sensor"
tristate "AMD Athlon64/FX or Opteron temperature sensor"
depends on HWMON && X86 && PCI && EXPERIMENTAL
help
If you say yes here you get support for the temperature
sensor(s) inside your AMD K8 CPU.
sensor(s) inside your CPU. Supported is whole AMD K8
microarchitecture. Please note that you will need at least
lm-sensors 2.10.1 for proper userspace support.

This driver can also be built as a module. If so, the module
will be called k8temp.
Expand Down Expand Up @@ -369,8 +371,8 @@ config SENSORS_SMSC47M1
help
If you say yes here you get support for the integrated fan
monitoring and control capabilities of the SMSC LPC47B27x,
LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x, LPC47M192 and
LPC47M997 chips.
LPC47M10x, LPC47M112, LPC47M13x, LPC47M14x, LPC47M15x,
LPC47M192 and LPC47M997 chips.

The temperature and voltage sensor features of the LPC47M192
and LPC47M997 are supported by another driver, select also
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm9240.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (C) 1999 Frodo Looijaard <[email protected]>
* Philip Edelbrock <[email protected]>
* Copyright (C) 2003 Michiel Rook <[email protected]>
* Copyright (C) 2005 Grant Coady <[email protected]> with valuable
* Copyright (C) 2005 Grant Coady <gcoady.lk@gmail.com> with valuable
* guidance from Jean Delvare
*
* Driver supports Analog Devices ADM9240
Expand Down Expand Up @@ -774,7 +774,7 @@ static void __exit sensors_adm9240_exit(void)
}

MODULE_AUTHOR("Michiel Rook <[email protected]>, "
"Grant Coady <[email protected]> and others");
"Grant Coady <gcoady.lk@gmail.com> and others");
MODULE_DESCRIPTION("ADM9240/DS1780/LM81 driver");
MODULE_LICENSE("GPL");

Expand Down
12 changes: 6 additions & 6 deletions drivers/hwmon/lm78.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,18 +815,18 @@ static int __init sm_lm78_init(void)
if (res)
return res;

res = i2c_isa_add_driver(&lm78_isa_driver);
if (res) {
i2c_del_driver(&lm78_driver);
return res;
}
/* Don't exit if this one fails, we still want the I2C variants
to work! */
if (i2c_isa_add_driver(&lm78_isa_driver))
isa_address = 0;

return 0;
}

static void __exit sm_lm78_exit(void)
{
i2c_isa_del_driver(&lm78_isa_driver);
if (isa_address)
i2c_isa_del_driver(&lm78_isa_driver);
i2c_del_driver(&lm78_driver);
}

Expand Down
11 changes: 6 additions & 5 deletions drivers/hwmon/smsc47m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
smsc47m1.c - Part of lm_sensors, Linux kernel modules
for hardware monitoring
Supports the SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x,
LPC47M15x, LPC47M192 and LPC47M997 Super-I/O chips.
Supports the SMSC LPC47B27x, LPC47M10x, LPC47M112, LPC47M13x,
LPC47M14x, LPC47M15x, LPC47M192 and LPC47M997 Super-I/O chips.
Copyright (C) 2002 Mark D. Studebaker <[email protected]>
Copyright (C) 2004 Jean Delvare <[email protected]>
Expand Down Expand Up @@ -380,8 +380,8 @@ static int __init smsc47m1_find(unsigned short *addr)
val = superio_inb(SUPERIO_REG_DEVID);

/*
* SMSC LPC47M10x/LPC47M13x (device id 0x59), LPC47M14x (device id
* 0x5F) and LPC47B27x (device id 0x51) have fan control.
* SMSC LPC47M10x/LPC47M112/LPC47M13x (device id 0x59), LPC47M14x
* (device id 0x5F) and LPC47B27x (device id 0x51) have fan control.
* The LPC47M15x and LPC47M192 chips "with hardware monitoring block"
* can do much more besides (device id 0x60).
* The LPC47M997 is undocumented, but seems to be compatible with
Expand All @@ -390,7 +390,8 @@ static int __init smsc47m1_find(unsigned short *addr)
if (val == 0x51)
printk(KERN_INFO "smsc47m1: Found SMSC LPC47B27x\n");
else if (val == 0x59)
printk(KERN_INFO "smsc47m1: Found SMSC LPC47M10x/LPC47M13x\n");
printk(KERN_INFO "smsc47m1: Found SMSC "
"LPC47M10x/LPC47M112/LPC47M13x\n");
else if (val == 0x5F)
printk(KERN_INFO "smsc47m1: Found SMSC LPC47M14x\n");
else if (val == 0x60)
Expand Down
11 changes: 9 additions & 2 deletions drivers/hwmon/w83627ehf.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr)
case 0:
reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0xcf)
| ((data->fan_div[0] & 0x03) << 4);
/* fan5 input control bit is write only, compute the value */
reg |= (data->has_fan & (1 << 4)) ? 1 : 0;
w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg);
reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xdf)
| ((data->fan_div[0] & 0x04) << 3);
Expand All @@ -362,6 +364,8 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr)
case 1:
reg = (w83627ehf_read_value(client, W83627EHF_REG_FANDIV1) & 0x3f)
| ((data->fan_div[1] & 0x03) << 6);
/* fan5 input control bit is write only, compute the value */
reg |= (data->has_fan & (1 << 4)) ? 1 : 0;
w83627ehf_write_value(client, W83627EHF_REG_FANDIV1, reg);
reg = (w83627ehf_read_value(client, W83627EHF_REG_VBAT) & 0xbf)
| ((data->fan_div[1] & 0x04) << 4);
Expand Down Expand Up @@ -1216,13 +1220,16 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
superio_exit();

/* It looks like fan4 and fan5 pins can be alternatively used
as fan on/off switches */
as fan on/off switches, but fan5 control is write only :/
We assume that if the serial interface is disabled, designers
connected fan5 as input unless they are emitting log 1, which
is not the default. */

data->has_fan = 0x07; /* fan1, fan2 and fan3 */
i = w83627ehf_read_value(client, W83627EHF_REG_FANDIV1);
if ((i & (1 << 2)) && (!fan4pin))
data->has_fan |= (1 << 3);
if ((i & (1 << 0)) && (!fan5pin))
if (!(i & (1 << 1)) && (!fan5pin))
data->has_fan |= (1 << 4);

/* Register sysfs hooks */
Expand Down
30 changes: 16 additions & 14 deletions drivers/hwmon/w83781d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
bank. */
if (kind < 0) {
if (w83781d_read_value(client, W83781D_REG_CONFIG) & 0x80) {
dev_dbg(dev, "Detection failed at step 3\n");
dev_dbg(&adapter->dev, "Detection of w83781d chip "
"failed at step 3\n");
err = -ENODEV;
goto ERROR2;
}
Expand All @@ -1109,7 +1110,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
if ((!(val1 & 0x07)) &&
(((!(val1 & 0x80)) && (val2 != 0xa3) && (val2 != 0xc3))
|| ((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12)))) {
dev_dbg(dev, "Detection failed at step 4\n");
dev_dbg(&adapter->dev, "Detection of w83781d chip "
"failed at step 4\n");
err = -ENODEV;
goto ERROR2;
}
Expand All @@ -1119,7 +1121,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
((val1 & 0x80) && (val2 == 0x5c)))) {
if (w83781d_read_value
(client, W83781D_REG_I2C_ADDR) != address) {
dev_dbg(dev, "Detection failed at step 5\n");
dev_dbg(&adapter->dev, "Detection of w83781d "
"chip failed at step 5\n");
err = -ENODEV;
goto ERROR2;
}
Expand All @@ -1141,8 +1144,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
else if (val2 == 0x12)
vendid = asus;
else {
dev_dbg(dev, "Chip was made by neither "
"Winbond nor Asus?\n");
dev_dbg(&adapter->dev, "w83781d chip vendor is "
"neither Winbond nor Asus\n");
err = -ENODEV;
goto ERROR2;
}
Expand All @@ -1161,10 +1164,9 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
kind = as99127f;
else {
if (kind == 0)
dev_warn(dev, "Ignoring 'force' "
dev_warn(&adapter->dev, "Ignoring 'force' "
"parameter for unknown chip at "
"adapter %d, address 0x%02x\n",
i2c_adapter_id(adapter), address);
"address 0x%02x\n", address);
err = -EINVAL;
goto ERROR2;
}
Expand Down Expand Up @@ -1685,19 +1687,19 @@ sensors_w83781d_init(void)
if (res)
return res;

res = i2c_isa_add_driver(&w83781d_isa_driver);
if (res) {
i2c_del_driver(&w83781d_driver);
return res;
}
/* Don't exit if this one fails, we still want the I2C variants
to work! */
if (i2c_isa_add_driver(&w83781d_isa_driver))
isa_address = 0;

return 0;
}

static void __exit
sensors_w83781d_exit(void)
{
i2c_isa_del_driver(&w83781d_isa_driver);
if (isa_address)
i2c_isa_del_driver(&w83781d_isa_driver);
i2c_del_driver(&w83781d_driver);
}

Expand Down
Loading

0 comments on commit 64d9a39

Please sign in to comment.