diff options
58 files changed, 2319 insertions, 1742 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 591e94448e6..2a4d77946c7 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -483,3 +483,10 @@ Why: With the recent innovations in CPU hardware acceleration technologies Who: Alok N Kataria <akataria@vmware.com> ---------------------------- + +What: adt7473 hardware monitoring driver +When: February 2010 +Why: Obsoleted by the adt7475 driver. +Who: Jean Delvare <khali@linux-fr.org> + +--------------------------- diff --git a/Documentation/hwmon/adt7473 b/Documentation/hwmon/adt7473 index 1cbf671822e..446612bd1fb 100644 --- a/Documentation/hwmon/adt7473 +++ b/Documentation/hwmon/adt7473 @@ -9,6 +9,8 @@ Supported chips: Author: Darrick J. Wong +This driver is depreacted, please use the adt7475 driver instead. + Description ----------- diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475 index a2b1abec850..0502f2b464e 100644 --- a/Documentation/hwmon/adt7475 +++ b/Documentation/hwmon/adt7475 @@ -1,87 +1,117 @@ -This describes the interface for the ADT7475 driver: - -(there are 4 fans, numbered fan1 to fan4): - -fanX_input Read the current speed of the fan (in RPMs) -fanX_min Read/write the minimum speed of the fan. Dropping - below this sets an alarm. - -(there are three PWMs, numbered pwm1 to pwm3): - -pwmX Read/write the current duty cycle of the PWM. Writes - only have effect when auto mode is turned off (see - below). Range is 0 - 255. - -pwmX_enable Fan speed control method: - - 0 - No control (fan at full speed) - 1 - Manual fan speed control (using pwm[1-*]) - 2 - Automatic fan speed control - -pwmX_auto_channels_temp Select which channels affect this PWM - - 1 - TEMP1 controls PWM - 2 - TEMP2 controls PWM - 4 - TEMP3 controls PWM - 6 - TEMP2 and TEMP3 control PWM - 7 - All three inputs control PWM - -pwmX_freq Read/write the PWM frequency in Hz. The number - should be one of the following: - - 11 Hz - 14 Hz - 22 Hz - 29 Hz - 35 Hz - 44 Hz - 58 Hz - 88 Hz - -pwmX_auto_point1_pwm Read/write the minimum PWM duty cycle in automatic mode - -pwmX_auto_point2_pwm Read/write the maximum PWM duty cycle in automatic mode - -(there are three temperature settings numbered temp1 to temp3): - -tempX_input Read the current temperature. The value is in milli - degrees of Celsius. - -tempX_max Read/write the upper temperature limit - exceeding this - will cause an alarm. - -tempX_min Read/write the lower temperature limit - exceeding this - will cause an alarm. - -tempX_offset Read/write the temperature adjustment offset - -tempX_crit Read/write the THERM limit for remote1. - -tempX_crit_hyst Set the temperature value below crit where the - fans will stay on - this helps drive the temperature - low enough so it doesn't stay near the edge and - cause THERM to keep tripping. - -tempX_auto_point1_temp Read/write the minimum temperature where the fans will - turn on in automatic mode. - -tempX_auto_point2_temp Read/write the maximum temperature over which the fans - will run in automatic mode. tempX_auto_point1_temp - and tempX_auto_point2_temp together define the - range of automatic control. - -tempX_alarm Read a 1 if the max/min alarm is set -tempX_fault Read a 1 if either temp1 or temp3 diode has a fault - -(There are two voltage settings, in1 and in2): - -inX_input Read the current voltage on VCC. Value is in - millivolts. - -inX_min read/write the minimum voltage limit. - Dropping below this causes an alarm. - -inX_max read/write the maximum voltage limit. - Exceeding this causes an alarm. - -inX_alarm Read a 1 if the max/min alarm is set. +Kernel driver adt7475 +===================== + +Supported chips: + * Analog Devices ADT7473 + Prefix: 'adt7473' + Addresses scanned: I2C 0x2C, 0x2D, 0x2E + Datasheet: Publicly available at the On Semiconductors website + * Analog Devices ADT7475 + Prefix: 'adt7475' + Addresses scanned: I2C 0x2E + Datasheet: Publicly available at the On Semiconductors website + * Analog Devices ADT7476 + Prefix: 'adt7476' + Addresses scanned: I2C 0x2C, 0x2D, 0x2E + Datasheet: Publicly available at the On Semiconductors website + * Analog Devices ADT7490 + Prefix: 'adt7490' + Addresses scanned: I2C 0x2C, 0x2D, 0x2E + Datasheet: Publicly available at the On Semiconductors website + +Authors: + Jordan Crouse + Hans de Goede + Darrick J. Wong (documentation) + Jean Delvare + + +Description +----------- + +This driver implements support for the Analog Devices ADT7473, ADT7475, +ADT7476 and ADT7490 chip family. The ADT7473 and ADT7475 differ only in +minor details. The ADT7476 has additional features, including extra voltage +measurement inputs and VID support. The ADT7490 also has additional +features, including extra voltage measurement inputs and PECI support. All +the supported chips will be collectively designed by the name "ADT747x" in +the rest of this document. + +The ADT747x uses the 2-wire interface compatible with the SMBus 2.0 +specification. Using an analog to digital converter it measures three (3) +temperatures and two (2) or more voltages. It has four (4) 16-bit counters +for measuring fan speed. There are three (3) PWM outputs that can be used +to control fan speed. + +A sophisticated control system for the PWM outputs is designed into the +ADT747x that allows fan speed to be adjusted automatically based on any of the +three temperature sensors. Each PWM output is individually adjustable and +programmable. Once configured, the ADT747x will adjust the PWM outputs in +response to the measured temperatures without further host intervention. +This feature can also be disabled for manual control of the PWM's. + +Each of the measured inputs (voltage, temperature, fan speed) has +corresponding high/low limit values. The ADT747x will signal an ALARM if +any measured value exceeds either limit. + +The ADT747x samples all inputs continuously. The driver will not read +the registers more often than once every other second. Further, +configuration data is only read once per minute. + +Chip Differences Summary +------------------------ + +ADT7473: + * 2 voltage inputs + * system acoustics optimizations (not implemented) + +ADT7475: + * 2 voltage inputs + +ADT7476: + * 5 voltage inputs + * VID support + +ADT7490: + * 6 voltage inputs + * 1 Imon input (not implemented) + * PECI support (not implemented) + * 2 GPIO pins (not implemented) + * system acoustics optimizations (not implemented) + +Special Features +---------------- + +The ADT747x has a 10-bit ADC and can therefore measure temperatures +with a resolution of 0.25 degree Celsius. Temperature readings can be +configured either for two's complement format or "Offset 64" format, +wherein 64 is subtracted from the raw value to get the temperature value. + +The datasheet is very detailed and describes a procedure for determining +an optimal configuration for the automatic PWM control. + +Fan Speed Control +----------------- + +The driver exposes two trip points per PWM channel. + +point1: Set the PWM speed at the lower temperature bound +point2: Set the PWM speed at the higher temperature bound + +The ADT747x will scale the PWM linearly between the lower and higher PWM +speed when the temperature is between the two temperature boundaries. +Temperature boundaries are associated to temperature channels rather than +PWM outputs, and a given PWM output can be controlled by several temperature +channels. As a result, the ADT747x may compute more than one PWM value +for a channel at a given time, in which case the maximum value (fastest +fan speed) is applied. PWM values range from 0 (off) to 255 (full speed). + +Fan speed may be set to maximum when the temperature sensor associated with +the PWM control exceeds temp#_max. + +Notes +----- + +The nVidia binary driver presents an ADT7473 chip via an on-card i2c bus. +Unfortunately, they fail to set the i2c adapter class, so this driver may +fail to find the chip until the nvidia driver is patched. diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg index bee4c30bc1e..a7952c2bd95 100644 --- a/Documentation/hwmon/f71882fg +++ b/Documentation/hwmon/f71882fg @@ -14,6 +14,10 @@ Supported chips: Prefix: 'f71882fg' Addresses scanned: none, address read from Super I/O config space Datasheet: Available from the Fintek website + * Fintek F71889FG + Prefix: 'f71889fg' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Should become available on the Fintek website soon * Fintek F8000 Prefix: 'f8000' Addresses scanned: none, address read from Super I/O config space @@ -51,6 +55,12 @@ supported. The right one to use depends on external circuitry on the motherboard, so the driver assumes that the BIOS set the method properly. +Note that the lowest numbered temperature zone trip point corresponds to +to the border between the highest and one but highest temperature zones, and +vica versa. So the temperature zone trip points 1-4 (or 1-2) go from high temp +to low temp! This is how things are implemented in the IC, and the driver +mimicks this. + There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM mode where the actual RPM of the fan (as measured) is controlled and the speed diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 659315d98e0..f9ba96c0ac4 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 @@ -86,7 +86,6 @@ The IT8712F and IT8716F additionally feature VID inputs, used to report the Vcore voltage of the processor. The early IT8712F have 5 VID pins, the IT8716F and late IT8712F have 6. They are shared with other functions though, so the functionality may not be available on a given system. -The driver dumbly assume it is there. The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value is stored in the Super-I/O configuration space. Due to technical limitations, diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc new file mode 100644 index 00000000000..044531a8640 --- /dev/null +++ b/Documentation/hwmon/mc13783-adc @@ -0,0 +1,50 @@ +Kernel driver mc13783-adc +========================= + +Supported chips: + * Freescale Atlas MC13783 + Prefix: 'mc13783_adc' + Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1 + +Authors: + Sascha Hauer <s.hauer@pengutronix.de> + Luotao Fu <l.fu@pengutronix.de> + +Description +----------- + +The Freescale MC13783 is a Power Management and Audio Circuit. Among +other things it contains a 10-bit A/D converter. The converter has 16 +channels which can be used in different modes. +The A/D converter has a resolution of 2.25mV. Channels 0-4 have +a dedicated meaning with chip internal scaling applied. Channels 5-7 +can be used as general purpose inputs or alternatively in a dedicated +mode. Channels 12-15 are occupied by the touchscreen if it's active. + +Currently the driver only supports channels 2 and 5-15 with no alternative +modes for channels 5-7. + +See this table for the meaning of the different channels and their chip +internal scaling: + +Channel Signal Input Range Scaling +------------------------------------------------------------------------------- +0 Battery Voltage (BATT) 2.50 - 4.65V -2.40V +1 Battery Current (BATT - BATTISNS) -50 - 50 mV x20 +2 Application Supply (BP) 2.50 - 4.65V -2.40V +3 Charger Voltage (CHRGRAW) 0 - 10V / /5 + 0 - 20V /10 +4 Charger Current (CHRGISNSP-CHRGISNSN) -0.25V - 0.25V x4 +5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No +6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / + 1.50 - 3.50V -1.20V +7 General Purpose ADIN7 / UID / Die Temperature 0 - 2.30V / No / + 0 - 2.55V / x0.9 / No +8 General Purpose ADIN8 0 - 2.30V No +9 General Purpose ADIN9 0 - 2.30V No +10 General Purpose ADIN10 0 - 2.30V No +11 General Purpose ADIN11 0 - 2.30V No +12 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.30V No +13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No +14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No +15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 82def883361..3de6b0bcb14 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface @@ -225,8 +225,6 @@ pwm[1-*]_auto_point[1-*]_temp_hyst to PWM output channels. RW -OR - temp[1-*]_auto_point[1-*]_pwm temp[1-*]_auto_point[1-*]_temp temp[1-*]_auto_point[1-*]_temp_hyst @@ -235,6 +233,15 @@ temp[1-*]_auto_point[1-*]_temp_hyst to temperature channels. RW +There is a third case where trip points are associated to both PWM output +channels and temperature channels: the PWM values are associated to PWM +output channels while the temperature values are associated to temperature +channels. In that case, the result is determined by the mapping between +temperature inputs and PWM outputs. When several temperature inputs are +mapped to a given PWM output, this leads to several candidate PWM values. +The actual result is up to the chip, but in general the highest candidate +value (fastest fan speed) wins. + **************** * Temperatures * diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf index 6ee36dbafd6..44dd2bcc72b 100644 --- a/Documentation/hwmon/w83627hf +++ b/Documentation/hwmon/w83627hf @@ -32,8 +32,6 @@ Authors: Module Parameters ----------------- -* force_addr: int - Initialize the ISA address of the sensors * force_i2c: int Initialize the I2C address of the sensors * init: int @@ -70,3 +68,30 @@ 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://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid + +Forcing the address +------------------- + +The driver used to have a module parameter named force_addr, which could +be used to force the base I/O address of the hardware monitoring block. +This was meant as a workaround for mainboards with a broken BIOS. This +module parameter is gone for technical reasons. If you need this feature, +you can obtain the same result by using the isaset tool (part of +lm-sensors) before loading the driver: + +# Enter the Super I/O config space +isaset -y -f 0x2e 0x87 +isaset -y -f 0x2e 0x87 + +# Select the hwmon logical device +isaset -y 0x2e 0x2f 0x07 0x0b + +# Set the base I/O address (to 0x290 in this example) +isaset -y 0x2e 0x2f 0x60 0x02 +isaset -y 0x2e 0x2f 0x61 0x90 + +# Exit the Super-I/O config space +isaset -y -f 0x2e 0xaa + +The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but +0x4e/0x4f is also possible. diff --git a/MAINTAINERS b/MAINTAINERS index 107a5a5a017..746b706206d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -327,6 +327,13 @@ M: Colin Leroy <colin@colino.net> S: Maintained F: drivers/macintosh/therm_adt746x.c +ADT7475 HARDWARE MONITOR DRIVER +M: Jean Delvare <khali@linux-fr.org> +L: lm-sensors@lm-sensors.org +S: Maintained +F: Documentation/hwmon/adt7475 +F: drivers/hwmon/adt7475.c + ADVANSYS SCSI DRIVER M: Matthew Wilcox <matthew@wil.cx> L: linux-scsi@vger.kernel.org @@ -2416,7 +2423,9 @@ HARDWARE MONITORING L: lm-sensors@lm-sensors.org W: http://www.lm-sensors.org/ S: Orphan +F: Documentation/hwmon/ F: drivers/hwmon/ +F: include/linux/hwmon*.h HARDWARE RANDOM NUMBER GENERATOR CORE M: Matt Mackall <mpm@selenic.com> @@ -3312,6 +3321,12 @@ S: Maintained F: Documentation/hwmon/lis3lv02d F: drivers/hwmon/lis3lv02d.* +LM73 HARDWARE MONITOR DRIVER +M: Guillaume Ligneul <guillaume.ligneul@gmail.com> +L: lm-sensors@lm-sensors.org +S: Maintained +F: drivers/hwmon/lm73.c + LM83 HARDWARE MONITOR DRIVER M: Jean Delvare <khali@linux-fr.org> L: lm-sensors@lm-sensors.org diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 700e93adeb3..9e640c62ebd 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -191,21 +191,27 @@ config SENSORS_ADT7470 will be called adt7470. config SENSORS_ADT7473 - tristate "Analog Devices ADT7473" + tristate "Analog Devices ADT7473 (DEPRECATED)" depends on I2C && EXPERIMENTAL + select SENSORS_ADT7475 help If you say yes here you get support for the Analog Devices ADT7473 temperature monitoring chips. + This driver is deprecated, you should use the adt7475 driver + instead. + This driver can also be built as a module. If so, the module will be called adt7473. config SENSORS_ADT7475 - tristate "Analog Devices ADT7475" + tristate "Analog Devices ADT7473, ADT7475, ADT7476 and ADT7490" depends on I2C && EXPERIMENTAL + select HWMON_VID help If you say yes here you get support for the Analog Devices - ADT7475 hardware monitoring chips. + ADT7473, ADT7475, ADT7476 and ADT7490 hardware monitoring + chips. This driver can also be build as a module. If so, the module will be called adt7475. @@ -305,12 +311,12 @@ config SENSORS_F71805F will be called f71805f. config SENSORS_F71882FG - tristate "Fintek F71858FG, F71862FG, F71882FG and F8000" + tristate "Fintek F71858FG, F71862FG, F71882FG, F71889FG and F8000" depends on EXPERIMENTAL help If you say yes here you get support for hardware monitoring - features of the Fintek F71858FG, F71862FG/71863FG, F71882FG/F71883FG - and F8000 Super-I/O chips. + features of the Fintek F71858FG, F71862FG/71863FG, F71882FG/F71883FG, + F71889FG and F8000 Super-I/O chips. This driver can also be built as a module. If so, the module will be called f71882fg. @@ -442,6 +448,15 @@ config SENSORS_LM70 This driver can also be built as a module. If so, the module will be called lm70. +config SENSORS_LM73 + tristate "National Semiconductor LM73" + depends on I2C + help + If you say yes here you get support for National Semiconductor LM73 + sensor chips. + This driver can also be built as a module. If so, the module + will be called lm73. + config SENSORS_LM75 tristate "National Semiconductor LM75 and compatibles" depends on I2C @@ -841,7 +856,7 @@ config SENSORS_W83781D config SENSORS_W83791D tristate "Winbond W83791D" - depends on I2C && EXPERIMENTAL + depends on I2C select HWMON_VID help If you say yes here you get support for the Winbond W83791D chip. @@ -1008,6 +1023,12 @@ config SENSORS_APPLESMC Say Y here if you have an applicable laptop and want to experience the awesome power of applesmc. +config SENSORS_MC13783_ADC + tristate "Freescale MC13783 ADC" + depends on MFD_MC13783 + help + Support for the A/D converter on MC13783 PMIC. + if ACPI comment "ACPI drivers" diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 9f46cb019cc..33c2ee10528 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -57,6 +57,7 @@ obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o hp_accel.o obj-$(CONFIG_SENSORS_LIS3_SPI) += lis3lv02d.o lis3lv02d_spi.o obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM70) += lm70.o +obj-$(CONFIG_SENSORS_LM73) += lm73.o obj-$(CONFIG_SENSORS_LM75) += lm75.o obj-$(CONFIG_SENSORS_LM77) += lm77.o obj-$(CONFIG_SENSORS_LM78) += lm78.o @@ -73,6 +74,7 @@ obj-$(CONFIG_SENSORS_LTC4245) += ltc4245.o obj-$(CONFIG_SENSORS_MAX1111) += max1111.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o obj-$(CONFIG_SENSORS_MAX6650) += max6650.o +obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PC87427) += pc87427.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c index afc59431812..33acf29531a 100644 --- a/drivers/hwmon/adm1021.c +++ b/drivers/hwmon/adm1021.c @@ -288,9 +288,8 @@ static int adm1021_detect(struct i2c_client *client, int kind, struct i2c_board_info *info) { struct i2c_adapter *adapter = client->adapter; - int i; - const char *type_name = ""; - int conv_rate, status, config; + const char *type_name; + int conv_rate, status, config, man_id, dev_id; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { pr_debug("adm1021: detect failed, " @@ -303,62 +302,37 @@ static int adm1021_detect(struct i2c_client *client, int kind, ADM1021_REG_CONV_RATE_R); config = i2c_smbus_read_byte_data(client, ADM1021_REG_CONFIG_R); - /* Now, we do the remaining detection. */ - if (kind < 0) { - if ((status & 0x03) != 0x00 || (config & 0x3F) != 0x00 - || (conv_rate & 0xF8) != 0x00) { - pr_debug("adm1021: detect failed, " - "chip not detected!\n"); - return -ENODEV; - } + /* Check unused bits */ + if ((status & 0x03) || (config & 0x3F) || (conv_rate & 0xF8)) { + pr_debug("adm1021: detect failed, chip not detected!\n"); + return -ENODEV; } /* Determine the chip type. */ - if (kind <= 0) { - i = i2c_smbus_read_byte_data(client, ADM1021_REG_MAN_ID); - if (i == 0x41) - if ((i2c_smbus_read_byte_data(client, - ADM1021_REG_DEV_ID) & 0xF0) == 0x30) - kind = adm1023; - else - kind = adm1021; - else if (i == 0x49) - kind = thmc10; - else if (i == 0x23) - kind = gl523sm; - else if ((i == 0x4d) && - (i2c_smbus_read_byte_data(client, - ADM1021_REG_DEV_ID) == 0x01)) - kind = max1617a; - else if (i == 0x54) |