2.6.15 Kernel patch for SMSC 47M192/47M997
Subsystems (2)
Hi everybody,
I noticed that the patch for 2.6.16-rc5 that I just posted does not work for 2.6.15 kernels. So, for convenience, here is the corresponding patch for 2.6.15, in case somebody wants to test the smsc47m192 driver on a 2.6.15 kernel.
Best regards,
Hartmut
-------------- next part --------------
Documentation/hwmon/smsc47m192 +105 -0
@@ -0,0 +1,105 @@ +Kernel driver smsc47m192 +============ + +Supported chips: + * SMSC LPC47M192 and LPC47M997 + Prefix: 'smsc47m192' + Addresses scanned: I2C 0x2c - 0x2d + Datasheet: The datasheet for LPC47M192 is publicly available from + http://www.smsc.com + The LPC47M997 is compatible for hardware monitoring + +Author: Hartmut Rick <linux at rick.claranet.de> + Special thanks to Jean Delvare for careful checking of + the code and many helpful comments and suggestions. + + +Description +----------- + +This driver implements support for the hardware sensor capabilities +of the SMSC LPC47M192 and LPC47M997 Super-I/O chips. + +These chips support 3 temperature channels and 8 voltage inputs +as well as CPU voltage VID input. + +They do also have fan monitoring and control capabilities, but the +latter are accessed via ISA bus and are not supported by this driver. +Use the 'smsc47m1' driver for fan monitoring. + +Voltages and temperatures are measured by an 8-bit ADC, the resolution +of the temperatures is 1 bit per degree C. +Voltages are scaled such that the nominal voltage corresponds to +192 counts, i.e. 3/4 of the full range. Thus the available range for +each voltage channel is 0V ... 255/192*(nominal voltage), the resolution +is 1 bit per (nominal voltage)/192. +Both voltage and temperature values are scaled by 1000, the sys files +show voltages in mV and temperatures in units of 0.001 degC. + +The +12V analog voltage input channel (in4_input) is multiplexed with +bit 4 of the encoded CPU voltage. This means that you either get +a +12V voltage measurement or a 5 bit CPU VID, but not both. +The default setting is to use the pin as 12V input, and use only 4 bit VID. +This driver assumes that the information in the configuration register +is correct, i.e. that the BIOS has updated the configuration if +the motherboard has this input wired to VID4. + + +/sys files +---------- + +in0_input - +2.5V voltage input +in1_input - CPU voltage input (nominal 2.25V) +in2_input - +3.3V voltage input +in3_input - +5V voltage input +in4_input - +12V voltage input (may be missing if used as VID4) +in5_input - Vcc voltage input (nominal 3.3V) + This is the supply voltage of the sensor chip itself. +in6_input - +1.5V voltage input +in7_input - +1.8V voltage input + +in[0-7]_min, +in[0-7]_max - lower and upper alarm thresholds for in[0-7]_input reading + + All voltages are read and written in mV. + +in_[0-7]_alarm - alarm flags for voltage inputs + These files read '1' in case of alarm, '0' otherwise. +alarms_in - alarm flags for voltage inputs + This file contains all voltage alarms, bit-packed, + bit 0 for in0_input. A set bit indicates an alarm. + +temp1_input - chip temperature measured by on-chip diode +temp[2-3]_input - temperature measured by external diodes (one of these would + typically be wired to the diode inside the CPU) + +temp[1-3]_min, +temp[1-3]_max - lower and upper alarm thresholds for temperatures + +temp[1-3]_offset - temperature offset registers + The chip adds the offsets stored in these registers to + the corresponding temperature readings. + Note that temp1 and temp2 offsets share the same register, + they can not both be different from zero at the same time. + Writing a non-zero number to one of them will reset the other + offset to zero. + + All temperatures and offsets are read and written in + units of 0.001 degC. + +temp[1-3]_alarm - alarm flags for temperature inputs, '1' in case of alarm, + '0' otherwise. +alarms_temp - alarm flags in one number, bits packed, bit 0 for temp1 +temp[2-3]_fault - diode fault flags for temperature inputs 2 and 3. + A fault is detected if the two pins for the corresponding + sensor are open or shorted, or any of the two is shortened + to ground or Vcc. +faults_temp - diode fault flags, bits packed, bits 1 and 2 for temp2 + and temp3 faults, respectively. + +cpu0_vid - CPU voltage as received from the CPU + +vrm - CPU VID standard used for decoding CPU voltage + +The *_min, *_max, *_offset and vrm files can be read and written, all others + are read-only
Documentation/hwmon/sysfs-interface +23 -0
@@ -219,2 +219,20 @@ temp[1-2]_crit_hyst +temp[1-4]_offset + Temperature offset which is added to the temperature reading + by the chip. + Unit: millidegree Celsius + Read/Write only value. + +temp[1-4]_alarm + Temperature alarm for one channel. '0' means no alarm, + '1' means alarm is active. If there is more than one + different kind of alarm, numbers larger than 1 can be used. + Read-only value + +temp[1-4]_fault + Temperature sensor fault. '0' means no fault, '1' or larger + means a fault was detected. + Read-only value + + If there are multiple temperature sensors, temp1_* is
@@ -263,2 +281,7 @@ alarms Alarm bitmask. +faults_temp Fault bitmask for temperature channels + Read only + A '1' bit means a temperature sensor fault is detected, + LSB corresponds to temp1 and so on + beep_enable Beep/interrupt enable
drivers/hwmon/Kconfig +22 -1
@@ -325,3 +325,8 @@ config SENSORS_SMSC47M1 monitoring and control capabilities of the SMSC LPC47B27x, - LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x and LPC47M192 chips. + LPC47M10x, 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 + "SMSC LPC47M192 and compatibles" below for those.
@@ -330,2 +335,18 @@ config SENSORS_SMSC47M1 +config SENSORS_SMSC47M192 + tristate "SMSC LPC47M192 and compatibles" + depends on HWMON && I2C && EXPERIMENTAL + select HWMON_VID + help + If you say yes here you get support for the temperature and + voltage sensors of the SMSC LPC47M192 and LPC47M997 chips. + + The fan monitoring and control capabilities of these chips + are supported by another driver, select + "SMSC LPC47M10x and compatibles" above. You need both drivers + if you want fan control and voltage/temperature sensor support. + + This driver can also be built as a module. If so, the module + will be called smsc47m192. + config SENSORS_SMSC47B397
drivers/hwmon/Makefile +1 -0
@@ -41,2 +41,3 @@ obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc4 obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o +obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o
drivers/hwmon/smsc47m192.c +678 -0
678 lines not on this page · raw message