Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:

 - New drivers for MAX6697 and compatibles and for INA209.

 - Added support for IT8771E, IT8772E, MAX34460, MAX34461, MCP98244, and
   ADT7420 to existing drivers.

 - Added support for additional attributes to various drivers.

 - Replaced SENSORS_LIMIT with clamp_val; retire SENSORS_LIMIT;

 - Clean up PMBus code to reduce its size; clean up adt7410 driver.

 - A couple of minor bug fixes as well as documentation cleanup.

 - Out-of-tree change: Replace SENSORS_LIMIT with clamp_val in
   platform/x86/eeepc-laptop driver.

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (32 commits)
  hwmon: (ntc_thermistor): Fix sparse warnings
  hwmon: (adt7410) Add device table entry for the adt7420
  hwmon: (adt7410) Use I2C_ADDRS helper macro
  hwmon: (adt7410) Use the SIMPLE_DEV_PM_OPS helper macro
  hwmon: (adt7410) Let suspend/resume depend on CONFIG_PM_SLEEP
  hwmon: (adt7410) Clear unwanted bits in the config register
  hwmon: (jc42) Add support for MCP98244
  hwmon: (pmbus) Clean up for code size reduction
  hwmon: (pmbus/max34440) Add support for MAX34460 and MAX34461
  hwmon: (pmbus) Add support for word status register
  hwmon: (pmbus/zl6100) Add support for VMON/VDRV
  hwmon: (pmbus) Add function to clear sensor cache
  hwmon: (pmbus) Add support for additional voltage sensor
  hwmon: (pmbus) Use krealloc to allocate attribute memory
  hwmon: (pmbus) Simplify memory allocation for sensor attributes
  hwmon: (pmbus) Improve boolean handling
  hwmon: (pmbus) Simplify memory allocation for labels and booleans
  hwmon: (pmbus) Use dev variable to represent client->dev
  hwmon: (pmbus) Fix 'Macros with multiple statements' checkpatch error
  hwmon: (pmbus) Drop unnecessary error messages in probe error path
  ...
  • Loading branch information
Linus Torvalds committed Feb 20, 2013
2 parents 8a3a11f + 4626dcf commit c560dc8
Show file tree
Hide file tree
Showing 82 changed files with 3,048 additions and 876 deletions.
18 changes: 18 additions & 0 deletions Documentation/devicetree/bindings/i2c/ina209.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ina209 properties

Required properties:
- compatible: Must be "ti,ina209"
- reg: I2C address

Optional properties:

- shunt-resistor
Shunt resistor value in micro-Ohm

Example:

temp-sensor@4c {
compatible = "ti,ina209";
reg = <0x4c>;
shunt-resistor = <5000>;
};
64 changes: 64 additions & 0 deletions Documentation/devicetree/bindings/i2c/max6697.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
max6697 properties

Required properties:
- compatible:
Should be one of
maxim,max6581
maxim,max6602
maxim,max6622
maxim,max6636
maxim,max6689
maxim,max6693
maxim,max6694
maxim,max6697
maxim,max6698
maxim,max6699
- reg: I2C address

Optional properties:

- smbus-timeout-disable
Set to disable SMBus timeout. If not specified, SMBus timeout will be
enabled.
- extended-range-enable
Only valid for MAX6581. Set to enable extended temperature range.
Extended temperature will be disabled if not specified.
- beta-compensation-enable
Only valid for MAX6693 and MX6694. Set to enable beta compensation on
remote temperature channel 1.
Beta compensation will be disabled if not specified.
- alert-mask
Alert bit mask. Alert disabled for bits set.
Select bit 0 for local temperature, bit 1..7 for remote temperatures.
If not specified, alert will be enabled for all channels.
- over-temperature-mask
Over-temperature bit mask. Over-temperature reporting disabled for
bits set.
Select bit 0 for local temperature, bit 1..7 for remote temperatures.
If not specified, over-temperature reporting will be enabled for all
channels.
- resistance-cancellation
Boolean for all chips other than MAX6581. Set to enable resistance
cancellation on remote temperature channel 1.
For MAX6581, resistance cancellation enabled for all channels if
specified as boolean, otherwise as per bit mask specified.
Only supported for remote temperatures (bit 1..7).
If not specified, resistance cancellation will be disabled for all
channels.
- transistor-ideality
For MAX6581 only. Two values; first is bit mask, second is ideality
select value as per MAX6581 data sheet. Select bit 1..7 for remote
channels.
Transistor ideality will be initialized to default (1.008) if not
specified.

Example:

temp-sensor@1a {
compatible = "maxim,max6697";
reg = <0x1a>;
smbus-timeout-disable;
resistance-cancellation;
alert-mask = <0x72>;
over-temperature-mask = <0x7f>;
};
9 changes: 9 additions & 0 deletions Documentation/hwmon/coretemp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Process Processor TjMax(C)
i5 3470T 91

32nm Core i3/i5/i7 Processors
i7 2600 98
i7 660UM/640/620, 640LM/620, 620M, 610E 105
i5 540UM/520/430, 540M/520/450/430 105
i3 330E, 370M/350/330 90 rPGA, 105 BGA
Expand All @@ -79,7 +80,10 @@ Process Processor TjMax(C)
P4505/P4500 90

32nm Atom Processors
S1260/1220 95
S1240 102
Z2460 90
Z2760 90
D2700/2550/2500 100
N2850/2800/2650/2600 100

Expand All @@ -98,6 +102,7 @@ Process Processor TjMax(C)

45nm Atom Processors
D525/510/425/410 100
K525/510/425/410 100
Z670/650 90
Z560/550/540/530P/530/520PT/520/515/510PT/510P 90
Z510/500 90
Expand All @@ -107,7 +112,11 @@ Process Processor TjMax(C)
330/230 125
E680/660/640/620 90
E680T/660T/640T/620T 110
E665C/645C 90
E665CT/645CT 110
CE4170/4150/4110 110
CE4200 series unknown
CE5300 series unknown

45nm Core2 Processors
Solo ULV SU3500/3300 100
Expand Down
93 changes: 93 additions & 0 deletions Documentation/hwmon/ina209
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Kernel driver ina209
=====================

Supported chips:
* Burr-Brown / Texas Instruments INA209
Prefix: 'ina209'
Addresses scanned: -
Datasheet:
http://www.ti.com/lit/gpn/ina209

Author: Paul Hays <Paul.Hays@cattail.ca>
Author: Ira W. Snyder <iws@ovro.caltech.edu>
Author: Guenter Roeck <linux@roeck-us.net>


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

The TI / Burr-Brown INA209 monitors voltage, current, and power on the high side
of a D.C. power supply. It can perform measurements and calculations in the
background to supply readings at any time. It includes a programmable
calibration multiplier to scale the displayed current and power values.


Sysfs entries
-------------

The INA209 chip is highly configurable both via hardwiring and via
the I2C bus. See the datasheet for details.

This tries to expose most monitoring features of the hardware via
sysfs. It does not support every feature of this chip.


in0_input shunt voltage (mV)
in0_input_highest shunt voltage historical maximum reading (mV)
in0_input_lowest shunt voltage historical minimum reading (mV)
in0_reset_history reset shunt voltage history
in0_max shunt voltage max alarm limit (mV)
in0_min shunt voltage min alarm limit (mV)
in0_crit_max shunt voltage crit max alarm limit (mV)
in0_crit_min shunt voltage crit min alarm limit (mV)
in0_max_alarm shunt voltage max alarm limit exceeded
in0_min_alarm shunt voltage min alarm limit exceeded
in0_crit_max_alarm shunt voltage crit max alarm limit exceeded
in0_crit_min_alarm shunt voltage crit min alarm limit exceeded

in1_input bus voltage (mV)
in1_input_highest bus voltage historical maximum reading (mV)
in1_input_lowest bus voltage historical minimum reading (mV)
in1_reset_history reset bus voltage history
in1_max bus voltage max alarm limit (mV)
in1_min bus voltage min alarm limit (mV)
in1_crit_max bus voltage crit max alarm limit (mV)
in1_crit_min bus voltage crit min alarm limit (mV)
in1_max_alarm bus voltage max alarm limit exceeded
in1_min_alarm bus voltage min alarm limit exceeded
in1_crit_max_alarm bus voltage crit max alarm limit exceeded
in1_crit_min_alarm bus voltage crit min alarm limit exceeded

power1_input power measurement (uW)
power1_input_highest power historical maximum reading (uW)
power1_reset_history reset power history
power1_max power max alarm limit (uW)
power1_crit power crit alarm limit (uW)
power1_max_alarm power max alarm limit exceeded
power1_crit_alarm power crit alarm limit exceeded

curr1_input current measurement (mA)

update_interval data conversion time; affects number of samples used
to average results for shunt and bus voltages.

General Remarks
---------------

The power and current registers in this chip require that the calibration
register is programmed correctly before they are used. Normally this is expected
to be done in the BIOS. In the absence of BIOS programming, the shunt resistor
voltage can be provided using platform data. The driver uses platform data from
the ina2xx driver for this purpose. If calibration register data is not provided
via platform data, the driver checks if the calibration register has been
programmed (ie has a value not equal to zero). If so, this value is retained.
Otherwise, a default value reflecting a shunt resistor value of 10 mOhm is
programmed into the calibration register.


Output Pins
-----------

Output pin programming is a board feature which depends on the BIOS. It is
outside the scope of a hardware monitoring driver to enable or disable output
pins.
16 changes: 12 additions & 4 deletions Documentation/hwmon/it87
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Supported chips:
Prefix: 'it8728'
Addresses scanned: from Super I/O config space (8 I/O ports)
Datasheet: Not publicly available
* IT8771E
Prefix: 'it8771'
Addresses scanned: from Super I/O config space (8 I/O ports)
Datasheet: Not publicly available
* IT8772E
Prefix: 'it8772'
Addresses scanned: from Super I/O config space (8 I/O ports)
Datasheet: Not publicly available
* IT8782F
Prefix: 'it8782'
Addresses scanned: from Super I/O config space (8 I/O ports)
Expand Down Expand Up @@ -83,8 +91,8 @@ Description
-----------

This driver implements support for the IT8705F, IT8712F, IT8716F,
IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8781F, IT8782F,
IT8783E/F, and SiS950 chips.
IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, IT8772E,
IT8782F, IT8783E/F, and SiS950 chips.

These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
joysticks and other miscellaneous stuff. For hardware monitoring, they
Expand Down Expand Up @@ -118,8 +126,8 @@ The IT8726F is just bit enhanced IT8716F with additional hardware
for AMD power sequencing. Therefore the chip will appear as IT8716F
to userspace applications.

The IT8728F is considered compatible with the IT8721F, until a datasheet
becomes available (hopefully.)
The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F,
until a datasheet becomes available (hopefully.)

Temperatures are measured in degrees Celsius. An alarm is triggered once
when the Overtemperature Shutdown limit is crossed.
Expand Down
3 changes: 2 additions & 1 deletion Documentation/hwmon/jc42
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ Supported chips:
* Maxim MAX6604
Datasheets:
http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf
* Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP9843
* Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP98244, MCP9843
Datasheets:
http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/22327A.pdf
* NXP Semiconductors SE97, SE97B, SE98, SE98A
Datasheets:
http://www.nxp.com/documents/data_sheet/SE97.pdf
Expand Down
90 changes: 90 additions & 0 deletions Documentation/hwmon/lm73
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Kernel driver lm73
==================

Supported chips:
* Texas Instruments LM73
Prefix: 'lm73'
Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e
Datasheet: Publicly available at the Texas Instruments website
http://www.ti.com/product/lm73

Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>
Documentation: Chris Verges <kg4ysn@gmail.com>


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

The LM73 is a digital temperature sensor. All temperature values are
given in degrees Celsius.

Measurement Resolution Support
------------------------------

The LM73 supports four resolutions, defined in terms of degrees C per
LSB: 0.25, 0.125, 0.0625, and 0.3125. Changing the resolution mode
affects the conversion time of the LM73's analog-to-digital converter.
From userspace, the desired resolution can be specified as a function of
conversion time via the 'update_interval' sysfs attribute for the
device. This attribute will normalize ranges of input values to the
maximum times defined for the resolution in the datasheet.

Resolution Conv. Time Input Range
(C/LSB) (msec) (msec)
--------------------------------------
0.25 14 0..14
0.125 28 15..28
0.0625 56 29..56
0.03125 112 57..infinity
--------------------------------------

The following examples show how the 'update_interval' attribute can be
used to change the conversion time:

$ echo 0 > update_interval
$ cat update_interval
14
$ cat temp1_input
24250

$ echo 22 > update_interval
$ cat update_interval
28
$ cat temp1_input
24125

$ echo 56 > update_interval
$ cat update_interval
56
$ cat temp1_input
24062

$ echo 85 > update_interval
$ cat update_interval
112
$ cat temp1_input
24031

As shown here, the lm73 driver automatically adjusts any user input for
'update_interval' via a step function. Reading back the
'update_interval' value after a write operation will confirm the
conversion time actively in use.

Mathematically, the resolution can be derived from the conversion time
via the following function:

g(x) = 0.250 * [log(x/14) / log(2)]

where 'x' is the output from 'update_interval' and 'g(x)' is the
resolution in degrees C per LSB.

Alarm Support
-------------

The LM73 features a simple over-temperature alarm mechanism. This
feature is exposed via the sysfs attributes.

The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
provided by the LM73 that indicate whether the measured temperature has
passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These
values _must_ be read to clear the registers on the LM73.
16 changes: 16 additions & 0 deletions Documentation/hwmon/max34440
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ Supported chips:
Prefixes: 'max34446'
Addresses scanned: -
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX34446.pdf
* Maxim MAX34460
PMBus 12-Channel Voltage Monitor & Sequencer
Prefix: 'max34460'
Addresses scanned: -
Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34460.pdf
* Maxim MAX34461
PMBus 16-Channel Voltage Monitor & Sequencer
Prefix: 'max34461'
Addresses scanned: -
Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX34461.pdf

Author: Guenter Roeck <guenter.roeck@ericsson.com>

Expand All @@ -26,6 +36,9 @@ Description
This driver supports hardware montoring for Maxim MAX34440 PMBus 6-Channel
Power-Supply Manager, MAX34441 PMBus 5-Channel Power-Supply Manager
and Intelligent Fan Controller, and MAX34446 PMBus Power-Supply Data Logger.
It also supports the MAX34460 and MAX34461 PMBus Voltage Monitor & Sequencers.
The MAX34460 supports 12 voltage channels, and the MAX34461 supports 16 voltage
channels.

The driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus for details on PMBus client drivers.
Expand Down Expand Up @@ -109,3 +122,6 @@ temp[1-8]_reset_history Write any value to reset history.

temp7 and temp8 attributes only exist for MAX34440.
MAX34446 only supports temp[1-3].

MAX34460 supports attribute groups in[1-12] and temp[1-5].
MAX34461 supports attribute groups in[1-16] and temp[1-5].
Loading

0 comments on commit c560dc8

Please sign in to comment.