-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
…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
Showing
82 changed files
with
3,048 additions
and
876 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.