-
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 ADC128D818, LTC2945, LTC4260, and LTC4222 - Added support for LTM4676 to ltc2978 driver - Converted several drivers to use devm_hwmon_device_register_with_groups - Various cleanup in several drivers * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (36 commits) hwmon: (pmbus/ltc2978) Add support for LTM4676 hwmon: (pmbus/ltc2978) Add new chip ID for LTC2974 hwmon: Do not accept invalid name attributes hwmon: (max6639) Use SIMPLE_DEV_PM_OPS macro hwmon: (lm95245) Make temp2_crit_hyst read-only hwmon: (lm95245) Convert to use devm_hwmon_device_register_with_groups hwmon: (lm95245) Drop useless debug message hwmon: (lm95245) Fix hysteresis temperatures hwmon: (max6639) Convert to use devm_hwmon_device_register_with_groups hwmon: (max6639) Introduce local dev variable, and reduce noisiness hwmon: (max6650) Introduce local 'dev' variable hwmon: (max6650) Drop error message after memory allocation failures hwmon: (max6650) Convert to use devm_hwmon_device_register_with_groups hwmon: (max6650) Rearrange code to no longer require forward declarations hwmon: (ltc4215) Convert to devm_hwmon_device_register_with_groups hwmon: (coretemp) Convert to use devm_hwmon_device_register_with_groups hwmon: (coretemp) Allocate platform data with devm_kzalloc hwmon: (coretemp) Use sysfs_create_group to create sysfs attributes hwmon: (ltc4245) Remove devicetree conditionals hwmon: (ltc4245) Drop debug messages ...
- Loading branch information
Showing
25 changed files
with
2,341 additions
and
902 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,47 @@ | ||
Kernel driver adc128d818 | ||
======================== | ||
|
||
Supported chips: | ||
* Texas Instruments ADC818D818 | ||
Prefix: 'adc818d818' | ||
Addresses scanned: I2C 0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f | ||
Datasheet: Publicly available at the TI website | ||
http://www.ti.com/ | ||
|
||
Author: Guenter Roeck | ||
|
||
Description | ||
----------- | ||
|
||
This driver implements support for the Texas Instruments ADC128D818. | ||
It is described as 'ADC System Monitor with Temperature Sensor'. | ||
|
||
The ADC128D818 implements one temperature sensor and seven voltage sensors. | ||
|
||
Temperatures are measured in degrees Celsius. There is one set of limits. | ||
When the HOT Temperature Limit is crossed, this will cause an alarm that will | ||
be reasserted until the temperature drops below the HOT Hysteresis. | ||
Measurements are guaranteed between -55 and +125 degrees. The temperature | ||
measurement has a resolution of 0.5 degrees; the limits have a resolution | ||
of 1 degree. | ||
|
||
Voltage sensors (also known as IN sensors) report their values in volts. | ||
An alarm is triggered if the voltage has crossed a programmable minimum | ||
or maximum limit. Note that minimum in this case always means 'closest to | ||
zero'; this is important for negative voltage measurements. All voltage | ||
inputs can measure voltages between 0 and 2.55 volts, with a resolution | ||
of 0.625 mV. | ||
|
||
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 | ||
already have disappeared by the time the alarm is read. The driver | ||
caches the alarm status for each sensor until it is at least reported | ||
once, to ensure that alarms are reported to user space. | ||
|
||
The ADC128D818 only updates its values approximately once per second; | ||
reading it more often will do no harm, but will return 'old' values. | ||
|
||
In addition to the scanned address list, the chip can also be configured for | ||
addresses 0x35 to 0x37. Those addresses are not scanned. You have to instantiate | ||
the driver explicitly if the chip is configured for any of those addresses in | ||
your system. |
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,84 @@ | ||
Kernel driver ltc2945 | ||
===================== | ||
|
||
Supported chips: | ||
* Linear Technology LTC2945 | ||
Prefix: 'ltc2945' | ||
Addresses scanned: - | ||
Datasheet: | ||
http://cds.linear.com/docs/en/datasheet/2945fa.pdf | ||
|
||
Author: Guenter Roeck <linux@roeck-us.net> | ||
|
||
|
||
Description | ||
----------- | ||
|
||
The LTC2945 is a rail-to-rail system monitor that measures current, voltage, | ||
and power consumption. | ||
|
||
|
||
Usage Notes | ||
----------- | ||
|
||
This driver does not probe for LTC2945 devices, since there is no register | ||
which can be safely used to identify the chip. You will have to instantiate | ||
the devices explicitly. | ||
|
||
Example: the following will load the driver for an LTC2945 at address 0x10 | ||
on I2C bus #1: | ||
$ modprobe ltc2945 | ||
$ echo ltc2945 0x10 > /sys/bus/i2c/devices/i2c-1/new_device | ||
|
||
|
||
Sysfs entries | ||
------------- | ||
|
||
Voltage readings provided by this driver are reported as obtained from the ADC | ||
registers. If a set of voltage divider resistors is installed, calculate the | ||
real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the | ||
value of the divider resistor against the measured voltage and R2 is the value | ||
of the divider resistor against Ground. | ||
|
||
Current reading provided by this driver is reported as obtained from the ADC | ||
Current Sense register. The reported value assumes that a 1 mOhm sense resistor | ||
is installed. If a different sense resistor is installed, calculate the real | ||
current by dividing the reported value by the sense resistor value in mOhm. | ||
|
||
in1_input VIN voltage (mV). Voltage is measured either at | ||
SENSE+ or VDD pin depending on chip configuration. | ||
in1_min Undervoltage threshold | ||
in1_max Overvoltage threshold | ||
in1_lowest Lowest measured voltage | ||
in1_highest Highest measured voltage | ||
in1_reset_history Write 1 to reset in1 history | ||
in1_min_alarm Undervoltage alarm | ||
in1_max_alarm Overvoltage alarm | ||
|
||
in2_input ADIN voltage (mV) | ||
in2_min Undervoltage threshold | ||
in2_max Overvoltage threshold | ||
in2_lowest Lowest measured voltage | ||
in2_highest Highest measured voltage | ||
in2_reset_history Write 1 to reset in2 history | ||
in2_min_alarm Undervoltage alarm | ||
in2_max_alarm Overvoltage alarm | ||
|
||
curr1_input SENSE current (mA) | ||
curr1_min Undercurrent threshold | ||
curr1_max Overcurrent threshold | ||
curr1_lowest Lowest measured current | ||
curr1_highest Highest measured current | ||
curr1_reset_history Write 1 to reset curr1 history | ||
curr1_min_alarm Undercurrent alarm | ||
curr1_max_alarm Overcurrent alarm | ||
|
||
power1_input Power (in uW). Power is calculated based on SENSE+/VDD | ||
voltage or ADIN voltage depending on chip configuration. | ||
power1_min Low lower threshold | ||
power1_max High power threshold | ||
power1_input_lowest Historical minimum power use | ||
power1_input_highest Historical maximum power use | ||
power1_reset_history Write 1 to reset power1 history | ||
power1_min_alarm Low power alarm | ||
power1_max_alarm High power alarm |
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,56 @@ | ||
Kernel driver ltc4260 | ||
===================== | ||
|
||
Supported chips: | ||
* Linear Technology LTC4260 | ||
Prefix: 'ltc4260' | ||
Addresses scanned: - | ||
Datasheet: | ||
http://cds.linear.com/docs/en/datasheet/4260fc.pdf | ||
|
||
Author: Guenter Roeck <linux@roeck-us.net> | ||
|
||
|
||
Description | ||
----------- | ||
|
||
The LTC4260 Hot Swap controller allows a board to be safely inserted | ||
and removed from a live backplane. | ||
|
||
|
||
Usage Notes | ||
----------- | ||
|
||
This driver does not probe for LTC4260 devices, since there is no register | ||
which can be safely used to identify the chip. You will have to instantiate | ||
the devices explicitly. | ||
|
||
Example: the following will load the driver for an LTC4260 at address 0x10 | ||
on I2C bus #1: | ||
$ modprobe ltc4260 | ||
$ echo ltc4260 0x10 > /sys/bus/i2c/devices/i2c-1/new_device | ||
|
||
|
||
Sysfs entries | ||
------------- | ||
|
||
Voltage readings provided by this driver are reported as obtained from the ADC | ||
registers. If a set of voltage divider resistors is installed, calculate the | ||
real voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the | ||
value of the divider resistor against the measured voltage and R2 is the value | ||
of the divider resistor against Ground. | ||
|
||
Current reading provided by this driver is reported as obtained from the ADC | ||
Current Sense register. The reported value assumes that a 1 mOhm sense resistor | ||
is installed. If a different sense resistor is installed, calculate the real | ||
current by dividing the reported value by the sense resistor value in mOhm. | ||
|
||
in1_input SOURCE voltage (mV) | ||
in1_min_alarm Undervoltage alarm | ||
in1_max_alarm Overvoltage alarm | ||
|
||
in2_input ADIN voltage (mV) | ||
in2_alarm Power bad alarm | ||
|
||
curr1_input SENSE current (mA) | ||
curr1_alarm SENSE overcurrent alarm |
Oops, something went wrong.