Skip to content

Commit

Permalink
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Browse files Browse the repository at this point in the history
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (59 commits)
  hwmon: (lm80) Add individual alarm files
  hwmon: (lm80) De-macro the sysfs callbacks
  hwmon: (lm80) Various cleanups
  hwmon: (w83627hf) Refactor beep enable handling
  hwmon: (w83627hf) Add individual alarm and beep files
  hwmon: (w83627hf) Enable VBAT monitoring
  hwmon: (w83627ehf) The W83627DHG has 8 VID pins
  hwmon: (asb100) Add individual alarm files
  hwmon: (asb100) De-macro the sysfs callbacks
  hwmon: (asb100) Various cleanups
  hwmon: VRM is not written to registers
  hwmon: (dme1737) fix Super-IO device ID override
  hwmon: (dme1737) fix divide-by-0
  hwmon: (abituguru3) Add AUX4 fan input for Abit IP35 Pro
  hwmon: Add support for Texas Instruments/Burr-Brown ADS7828
  hwmon: (adm9240) Add individual alarm files
  hwmon: (lm77) Add individual alarm files
  hwmon: Discard useless I2C driver IDs
  hwmon: (lm85) Make the pwmN_enable files writable
  hwmon: (lm85) Return standard values in pwmN_enable
  ...
  • Loading branch information
Linus Torvalds committed Feb 8, 2008
2 parents 0b61a2b + e84542f commit d7511ec
Show file tree
Hide file tree
Showing 60 changed files with 3,689 additions and 1,731 deletions.
36 changes: 36 additions & 0 deletions Documentation/hwmon/ads7828
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Kernel driver ads7828
=====================

Supported chips:
* Texas Instruments/Burr-Brown ADS7828
Prefix: 'ads7828'
Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b
Datasheet: Publicly available at the Texas Instruments website :
http://focus.ti.com/lit/ds/symlink/ads7828.pdf

Authors:
Steve Hardy <steve@linuxrealtime.co.uk>

Module Parameters
-----------------

* se_input: bool (default Y)
Single ended operation - set to N for differential mode
* int_vref: bool (default Y)
Operate with the internal 2.5V reference - set to N for external reference
* vref_mv: int (default 2500)
If using an external reference, set this to the reference voltage in mV

Description
-----------

This driver implements support for the Texas Instruments ADS7828.

This device is a 12-bit 8-channel A-D converter.

It can operate in single ended mode (8 +ve inputs) or in differential mode,
where 4 differential pairs can be measured.

The chip also has the facility to use an external voltage reference. This
may be required if your hardware supplies the ADS7828 from a 5V supply, see
the datasheet for more details.
2 changes: 1 addition & 1 deletion Documentation/hwmon/it87
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Supported chips:
Datasheet: No longer be available

Authors:
Christophe Gauthron <chrisg@0-in.com>
Christophe Gauthron
Jean Delvare <khali@linux-fr.org>


Expand Down
4 changes: 2 additions & 2 deletions Documentation/hwmon/lm78
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Kernel driver lm78
Supported chips:
* National Semiconductor LM78 / LM78-J
Prefix: 'lm78'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/
* National Semiconductor LM79
Prefix: 'lm79'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/

Expand Down
11 changes: 8 additions & 3 deletions Documentation/hwmon/lm87
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ Kernel driver lm87
Supported chips:
* National Semiconductor LM87
Prefix: 'lm87'
Addresses scanned: I2C 0x2c - 0x2f
Addresses scanned: I2C 0x2c - 0x2e
Datasheet: http://www.national.com/pf/LM/LM87.html
* Analog Devices ADM1024
Prefix: 'adm1024'
Addresses scanned: I2C 0x2c - 0x2e
Datasheet: http://www.analog.com/en/prod/0,2877,ADM1024,00.html

Authors:
Frodo Looijaard <frodol@dds.nl>,
Expand All @@ -19,11 +23,12 @@ Authors:
Description
-----------

This driver implements support for the National Semiconductor LM87.
This driver implements support for the National Semiconductor LM87
and the Analog Devices ADM1024.

The LM87 implements up to three temperature sensors, up to two fan
rotation speed sensors, up to seven voltage sensors, alarms, and some
miscellaneous stuff.
miscellaneous stuff. The ADM1024 is fully compatible.

Temperatures are measured in degrees Celsius. Each input has a high
and low alarm settings. A high limit produces an alarm when the value
Expand Down
2 changes: 1 addition & 1 deletion Documentation/hwmon/userspace-tools
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Lm-sensors

Core set of utilities that will allow you to obtain health information,
setup monitoring limits etc. You can get them on their homepage
http://www.lm-sensors.nu/ or as a package from your Linux distribution.
http://www.lm-sensors.org/ or as a package from your Linux distribution.

If from website:
Get lm-sensors from project web site. Please note, you need only userspace
Expand Down
5 changes: 3 additions & 2 deletions Documentation/hwmon/w83627ehf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ W83627DHG super I/O chips. We will refer to them collectively as Winbond chips.

The chips implement three temperature sensors, five fan rotation
speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
VID (6 pins), alarms with beep warnings (control unimplemented), and
some automatic fan regulation strategies (plus manual fan control mode).
VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep
warnings (control unimplemented), and some automatic fan regulation
strategies (plus manual 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
Expand Down
3 changes: 1 addition & 2 deletions Documentation/hwmon/w83627hf
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,4 @@ doesn't help, you may just ignore the bogus VID reading with no harm done.

For further information on this driver see the w83781d driver documentation.

[1] http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc/vid

[1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid
22 changes: 8 additions & 14 deletions Documentation/hwmon/w83781d
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ Kernel driver w83781d
Supported chips:
* Winbond W83781D
Prefix: 'w83781d'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf
* Winbond W83782D
Prefix: 'w83782d'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf
* Winbond W83783S
Prefix: 'w83783s'
Addresses scanned: I2C 0x2d
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf
* Winbond W83627HF
Prefix: 'w83627hf'
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf
* Asus AS99127F
Prefix: 'as99127f'
Addresses scanned: I2C 0x28 - 0x2f
Expand Down Expand Up @@ -50,20 +46,18 @@ force_subclients=bus,caddr,saddr,saddr
Description
-----------

This driver implements support for the Winbond W83781D, W83782D, W83783S,
W83627HF chips, and the Asus AS99127F chips. We will refer to them
collectively as W8378* chips.
This driver implements support for the Winbond W83781D, W83782D, W83783S
chips, and the Asus AS99127F chips. We will refer to them collectively as
W8378* chips.

There is quite some difference between these chips, but they are similar
enough that it was sensible to put them together in one driver.
The W83627HF chip is assumed to be identical to the ISA W83782D.
The Asus chips are similar to an I2C-only W83782D.

Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
as99127f 7 3 0 3 0x31 0x12c3 yes no
as99127f rev.2 (type_name = as99127f) 0x31 0x5ca3 yes no
w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes
w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC)
w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes
w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no

Expand Down Expand Up @@ -143,9 +137,9 @@ Individual alarm and beep bits:
0x000400: in6
0x000800: fan3
0x001000: chassis
0x002000: temp3 (W83782D and W83627HF only)
0x010000: in7 (W83782D and W83627HF only)
0x020000: in8 (W83782D and W83627HF only)
0x002000: temp3 (W83782D only)
0x010000: in7 (W83782D only)
0x020000: in8 (W83782D only)

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
Expand Down
54 changes: 54 additions & 0 deletions Documentation/hwmon/w83l786ng
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Kernel driver w83l786ng
=====================

Supported chips:
* Winbond W83L786NG/W83L786NR
Prefix: 'w83l786ng'
Addresses scanned: I2C 0x2e - 0x2f
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L786NRNG09.pdf

Author: Kevin Lo <kevlo@kevlo.org>


Module Parameters
-----------------

* reset boolean
(default 0)
Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
behavior is no chip reset to preserve BIOS settings


Description
-----------

This driver implements support for Winbond W83L786NG/W83L786NR chips.

The driver implements two temperature sensors, two fan rotation speed
sensors, and three voltage sensors.

Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and temp2.

Fan rotation speeds are reported in RPM (rotations per minute). Fan readings
readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64
or 128 for fan 1/2) to give the readings more range or accuracy.

Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.

/sys files
----------

pwm[1-2] - this file stores PWM duty cycle or DC value (fan speed) in range:
0 (stop) to 255 (full)
pwm[1-2]_enable - this file controls mode of fan/temperature control:
* 0 Manual Mode
* 1 Thermal Cruise
* 2 Smart Fan II
* 4 FAN_SET
pwm[1-2]_mode - Select PWM of DC mode
* 0 DC
* 1 PWM
tolerance[1-2] - Value in degrees of Celsius (degC) for +- T
2 changes: 1 addition & 1 deletion Documentation/i2c/busses/i2c-piix4
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ of all affected systems, so the only safe solution was to prevent access to
the SMBus on all IBM systems (detected using DMI data.)

For additional information, read:
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/README.thinkpad
http://www.lm-sensors.org/browser/lm-sensors/trunk/README.thinkpad
62 changes: 48 additions & 14 deletions drivers/firmware/dmi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ static char * __init dmi_string(const struct dmi_header *dm, u8 s)
* We have to be cautious here. We have seen BIOSes with DMI pointers
* pointing to completely the wrong place for example
*/
static int __init dmi_table(u32 base, int len, int num,
void (*decode)(const struct dmi_header *))
static void dmi_table(u8 *buf, int len, int num,
void (*decode)(const struct dmi_header *))
{
u8 *buf, *data;
u8 *data = buf;
int i = 0;

buf = dmi_ioremap(base, len);
if (buf == NULL)
return -1;

data = buf;

/*
* Stop when we see all the items the table claimed to have
* OR we run off the end of the table (also happens)
Expand All @@ -75,7 +69,23 @@ static int __init dmi_table(u32 base, int len, int num,
data += 2;
i++;
}
dmi_iounmap(buf, len);
}

static u32 dmi_base;
static u16 dmi_len;
static u16 dmi_num;

static int __init dmi_walk_early(void (*decode)(const struct dmi_header *))
{
u8 *buf;

buf = dmi_ioremap(dmi_base, dmi_len);
if (buf == NULL)
return -1;

dmi_table(buf, dmi_len, dmi_num, decode);

dmi_iounmap(buf, dmi_len);
return 0;
}

Expand Down Expand Up @@ -291,9 +301,9 @@ static int __init dmi_present(const char __iomem *p)

memcpy_fromio(buf, p, 15);
if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
u16 num = (buf[13] << 8) | buf[12];
u16 len = (buf[7] << 8) | buf[6];
u32 base = (buf[11] << 24) | (buf[10] << 16) |
dmi_num = (buf[13] << 8) | buf[12];
dmi_len = (buf[7] << 8) | buf[6];
dmi_base = (buf[11] << 24) | (buf[10] << 16) |
(buf[9] << 8) | buf[8];

/*
Expand All @@ -305,7 +315,7 @@ static int __init dmi_present(const char __iomem *p)
buf[14] >> 4, buf[14] & 0xF);
else
printk(KERN_INFO "DMI present.\n");
if (dmi_table(base,len, num, dmi_decode) == 0)
if (dmi_walk_early(dmi_decode) == 0)
return 0;
}
return 1;
Expand Down Expand Up @@ -489,3 +499,27 @@ int dmi_get_year(int field)

return year;
}

/**
* dmi_walk - Walk the DMI table and get called back for every record
* @decode: Callback function
*
* Returns -1 when the DMI table can't be reached, 0 on success.
*/
int dmi_walk(void (*decode)(const struct dmi_header *))
{
u8 *buf;

if (!dmi_available)
return -1;

buf = ioremap(dmi_base, dmi_len);
if (buf == NULL)
return -1;

dmi_table(buf, dmi_len, dmi_num, decode);

iounmap(buf);
return 0;
}
EXPORT_SYMBOL_GPL(dmi_walk);
Loading

0 comments on commit d7511ec

Please sign in to comment.