Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cb60328 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'hwmon-for-linus' of...

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (26 commits)
  hwmon: (w83627ehf) Better fix for negative temperature values
  hwmon: (w83627ehf) Uninline is_word_sized
  hwmon: (lm75) Document why clones are not detected
  hwmon: (w83627ehf) Move fan pins check to a separate function
  hwmon: (w83627ehf) Skip reading unused voltage registers
  hwmon: (lm75) Add support for Analog Devices ADT75
  hwmon: (pmbus_core) Simplify sign extensions
  hwmon: (pmbus) Add support for Lineage Power DC-DC converters
  hwmon: (pmbus/ltc2978) Add support for LTC3880 to LTC2978 driver
  hwmon: (pmbus/ltc2978) Explicit driver for LTC2978
  hwmon: (pmbus) Add support for TEMP2 peak attributes
  hwmon: AD7314 driver (ported from IIO)
  hwmon: (pmbus) Add support for Intersil power management chips
  hwmon: (pmbus) Always call _pmbus_read_byte in core driver
  hwmon: (pmbus) Replace EINVAL return codes with more appropriate errors
  hwmon: (pmbus) Provide more documentation
  hwmon/f71882fg: Make the decision wether to register fan attr. per fan
  hwmon/f71882fg: Add a f71882fg_create_fan_sysfs_files helper function
  hwmon/f71882fg: Make all fan/pwm attr tables 2 dimensional
  hwmon: (exynos4_tmu) Remove IRQF_DISABLED
  ...
parents 2355e429 c5794cfa
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
Kernel driver ad7314
====================

Supported chips:
   * Analog Devices AD7314
     Prefix: 'ad7314'
     Datasheet: Publicly available at Analog Devices website.
   * Analog Devices ADT7301
     Prefix: 'adt7301'
     Datasheet: Publicly available at Analog Devices website.
   * Analog Devices ADT7302
     Prefix: 'adt7302'
     Datasheet: Publicly available at Analog Devices website.

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

Driver supports the above parts.  The ad7314 has a 10 bit
sensor with 1lsb = 0.25 degrees centigrade. The adt7301 and
adt7302 have 14 bit sensors with 1lsb = 0.03125 degrees centigrade.

Notes
-----

Currently power down mode is not supported.
+26 −14
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ Supported chips:
    Prefix: 'adm1275'
    Addresses scanned: -
    Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1275.pdf
  * Analog Devices ADM1276
    Prefix: 'adm1276'
    Addresses scanned: -
    Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1276.pdf

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

@@ -13,13 +17,13 @@ Author: Guenter Roeck <guenter.roeck@ericsson.com>
Description
-----------

This driver supports hardware montoring for Analog Devices ADM1275 Hot-Swap
Controller and Digital Power Monitor.
This driver supports hardware montoring for Analog Devices ADM1275 and ADM1276
Hot-Swap Controller and Digital Power Monitor.

The ADM1275 is a hot-swap controller that allows a circuit board to be removed
from or inserted into a live backplane. It also features current and voltage
readback via an integrated 12-bit analog-to-digital converter (ADC), accessed
using a PMBus. interface.
ADM1275 and ADM1276 are hot-swap controllers that allow a circuit board to be
removed from or inserted into a live backplane. They also feature current and
voltage readback via an integrated 12-bit analog-to-digital converter (ADC),
accessed using a PMBus interface.

The driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus for details on PMBus client drivers.
@@ -48,17 +52,25 @@ attributes are write-only, all other attributes are read-only.

in1_label		"vin1" or "vout1" depending on chip variant and
			configuration.
in1_input		Measured voltage. From READ_VOUT register.
in1_min			Minumum Voltage. From VOUT_UV_WARN_LIMIT register.
in1_max			Maximum voltage. From VOUT_OV_WARN_LIMIT register.
in1_min_alarm		Voltage low alarm. From VOLTAGE_UV_WARNING status.
in1_max_alarm		Voltage high alarm. From VOLTAGE_OV_WARNING status.
in1_input		Measured voltage.
in1_min			Minumum Voltage.
in1_max			Maximum voltage.
in1_min_alarm		Voltage low alarm.
in1_max_alarm		Voltage high alarm.
in1_highest		Historical maximum voltage.
in1_reset_history	Write any value to reset history.

curr1_label		"iout1"
curr1_input		Measured current. From READ_IOUT register.
curr1_max		Maximum current. From IOUT_OC_WARN_LIMIT register.
curr1_max_alarm		Current high alarm. From IOUT_OC_WARN_LIMIT register.
curr1_input		Measured current.
curr1_max		Maximum current.
curr1_max_alarm		Current high alarm.
curr1_lcrit		Critical minimum current. Depending on the chip
			configuration, either curr1_lcrit or curr1_crit is
			supported, but not both.
curr1_lcrit_alarm	Critical current low alarm.
curr1_crit		Critical maximum current. Depending on the chip
			configuration, either curr1_lcrit or curr1_crit is
			supported, but not both.
curr1_crit_alarm	Critical current high alarm.
curr1_highest		Historical maximum current.
curr1_reset_history	Write any value to reset history.
+81 −0
Original line number Diff line number Diff line
Kernel driver exynos4_tmu
=================

Supported chips:
* ARM SAMSUNG EXYNOS4 series of SoC
  Prefix: 'exynos4-tmu'
  Datasheet: Not publicly available

Authors: Donggeun Kim <dg77.kim@samsung.com>

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

This driver allows to read temperature inside SAMSUNG EXYNOS4 series of SoC.

The chip only exposes the measured 8-bit temperature code value
through a register.
Temperature can be taken from the temperature code.
There are three equations converting from temperature to temperature code.

The three equations are:
  1. Two point trimming
	Tc = (T - 25) * (TI2 - TI1) / (85 - 25) + TI1

  2. One point trimming
	Tc = T + TI1 - 25

  3. No trimming
	Tc = T + 50

  Tc: Temperature code, T: Temperature,
  TI1: Trimming info for 25 degree Celsius (stored at TRIMINFO register)
       Temperature code measured at 25 degree Celsius which is unchanged
  TI2: Trimming info for 85 degree Celsius (stored at TRIMINFO register)
       Temperature code measured at 85 degree Celsius which is unchanged

TMU(Thermal Management Unit) in EXYNOS4 generates interrupt
when temperature exceeds pre-defined levels.
The maximum number of configurable threshold is four.
The threshold levels are defined as follows:
  Level_0: current temperature > trigger_level_0 + threshold
  Level_1: current temperature > trigger_level_1 + threshold
  Level_2: current temperature > trigger_level_2 + threshold
  Level_3: current temperature > trigger_level_3 + threshold

  The threshold and each trigger_level are set
  through the corresponding registers.

When an interrupt occurs, this driver notify user space of
one of four threshold levels for the interrupt
through kobject_uevent_env and sysfs_notify functions.
Although an interrupt condition for level_0 can be set,
it is not notified to user space through sysfs_notify function.

Sysfs Interface
---------------
name		name of the temperature sensor
		RO

temp1_input	temperature
		RO

temp1_max	temperature for level_1 interrupt
		RO

temp1_crit	temperature for level_2 interrupt
		RO

temp1_emergency	temperature for level_3 interrupt
		RO

temp1_max_alarm	alarm for level_1 interrupt
		RO

temp1_crit_alarm
		alarm for level_2 interrupt
		RO

temp1_emergency_alarm
		alarm for level_3 interrupt
		RO
+38 −23
Original line number Diff line number Diff line
@@ -12,26 +12,46 @@ Supported chips:
    Addresses scanned: I2C 0x48 - 0x4f
    Datasheet: Publicly available at the National Semiconductor website
               http://www.national.com/
  * Dallas Semiconductor DS75
    Prefix: 'lm75'
    Addresses scanned: I2C 0x48 - 0x4f
    Datasheet: Publicly available at the Dallas Semiconductor website
               http://www.maxim-ic.com/
  * Dallas Semiconductor DS1775
    Prefix: 'lm75'
    Addresses scanned: I2C 0x48 - 0x4f
  * Dallas Semiconductor DS75, DS1775
    Prefixes: 'ds75', 'ds1775'
    Addresses scanned: none
    Datasheet: Publicly available at the Dallas Semiconductor website
               http://www.maxim-ic.com/
  * Maxim MAX6625, MAX6626
    Prefix: 'lm75'
    Addresses scanned: I2C 0x48 - 0x4b
    Prefixes: 'max6625', 'max6626'
    Addresses scanned: none
    Datasheet: Publicly available at the Maxim website
               http://www.maxim-ic.com/
  * Microchip (TelCom) TCN75
    Prefix: 'lm75'
    Addresses scanned: I2C 0x48 - 0x4f
    Addresses scanned: none
    Datasheet: Publicly available at the Microchip website
               http://www.microchip.com/
  * Microchip MCP9800, MCP9801, MCP9802, MCP9803
    Prefix: 'mcp980x'
    Addresses scanned: none
    Datasheet: Publicly available at the Microchip website
               http://www.microchip.com/
  * Analog Devices ADT75
    Prefix: 'adt75'
    Addresses scanned: none
    Datasheet: Publicly available at the Analog Devices website
               http://www.analog.com/adt75
  * ST Microelectronics STDS75
    Prefix: 'stds75'
    Addresses scanned: none
    Datasheet: Publicly available at the ST website
               http://www.st.com/internet/analog/product/121769.jsp
  * Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275
    Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275'
    Addresses scanned: none
    Datasheet: Publicly available at the Texas Instruments website
               http://www.ti.com/product/tmp100
               http://www.ti.com/product/tmp101
               http://www.ti.com/product/tmp105
               http://www.ti.com/product/tmp75
               http://www.ti.com/product/tmp175
               http://www.ti.com/product/tmp275

Author: Frodo Looijaard <frodol@dds.nl>

@@ -50,21 +70,16 @@ range of -55 to +125 degrees.
The LM75 only updates its values each 1.5 seconds; reading it more often
will do no harm, but will return 'old' values.

The LM75 is usually used in combination with LM78-like chips, to measure
the temperature of the processor(s).

The DS75, DS1775, MAX6625, and MAX6626 are supported as well.
They are not distinguished from an LM75. While most of these chips
have three additional bits of accuracy (12 vs. 9 for the LM75),
the additional bits are not supported. Not only that, but these chips will
not be detected if not in 9-bit precision mode (use the force parameter if
needed).

The TCN75 is supported as well, and is not distinguished from an LM75.
The original LM75 was typically used in combination with LM78-like chips
on PC motherboards, to measure the temperature of the processor(s). Clones
are now used in various embedded designs.

The LM75 is essentially an industry standard; there may be other
LM75 clones not listed here, with or without various enhancements,
that are supported.
that are supported. The clones are not detected by the driver, unless
they reproduce the exact register tricks of the original LM75, and must
therefore be instantiated explicitly. The specific enhancements (such as
higher resolution) are not currently supported by the driver.

The LM77 is not supported, contrary to what we pretended for a long time.
Both chips are simply not compatible, value encoding differs.
+103 −0
Original line number Diff line number Diff line
Kernel driver ltc2978
=====================

Supported chips:
  * Linear Technology LTC2978
    Prefix: 'ltc2978'
    Addresses scanned: -
    Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
  * Linear Technology LTC3880
    Prefix: 'ltc3880'
    Addresses scanned: -
    Datasheet: http://cds.linear.com/docs/Datasheet/3880f.pdf

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


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

The LTC2978 is an octal power supply monitor, supervisor, sequencer and
margin controller. The LTC3880 is a dual, PolyPhase DC/DC synchronous
step-down switching regulator controller.


Usage Notes
-----------

This driver does not probe for PMBus devices. You will have to instantiate
devices explicitly.

Example: the following commands will load the driver for an LTC2978 at address
0x60 on I2C bus #1:

# modprobe ltc2978
# echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device


Sysfs attributes
----------------

in1_label		"vin"
in1_input		Measured input voltage.
in1_min			Minimum input voltage.
in1_max			Maximum input voltage.
in1_lcrit		Critical minimum input voltage.
in1_crit		Critical maximum input voltage.
in1_min_alarm		Input voltage low alarm.
in1_max_alarm		Input voltage high alarm.
in1_lcrit_alarm		Input voltage critical low alarm.
in1_crit_alarm		Input voltage critical high alarm.
in1_lowest		Lowest input voltage. LTC2978 only.
in1_highest		Highest input voltage.
in1_reset_history	Reset history. Writing into this attribute will reset
			history for all attributes.

in[2-9]_label		"vout[1-8]". Channels 3 to 9 on LTC2978 only.
in[2-9]_input		Measured output voltage.
in[2-9]_min		Minimum output voltage.
in[2-9]_max		Maximum output voltage.
in[2-9]_lcrit		Critical minimum output voltage.
in[2-9]_crit		Critical maximum output voltage.
in[2-9]_min_alarm	Output voltage low alarm.
in[2-9]_max_alarm	Output voltage high alarm.
in[2-9]_lcrit_alarm	Output voltage critical low alarm.
in[2-9]_crit_alarm	Output voltage critical high alarm.
in[2-9]_lowest		Lowest output voltage. LTC2978 only.
in[2-9]_highest		Lowest output voltage.
in[2-9]_reset_history	Reset history. Writing into this attribute will reset
			history for all attributes.

temp[1-3]_input		Measured temperature.
			On LTC2978, only one temperature measurement is
			supported and reflects the internal temperature.
			On LTC3880, temp1 and temp2 report external
			temperatures, and temp3 reports the internal
			temperature.
temp[1-3]_min		Mimimum temperature.
temp[1-3]_max		Maximum temperature.
temp[1-3]_lcrit		Critical low temperature.
temp[1-3]_crit		Critical high temperature.
temp[1-3]_min_alarm	Chip temperature low alarm.
temp[1-3]_max_alarm	Chip temperature high alarm.
temp[1-3]_lcrit_alarm	Chip temperature critical low alarm.
temp[1-3]_crit_alarm	Chip temperature critical high alarm.
temp[1-3]_lowest	Lowest measured temperature. LTC2978 only.
temp[1-3]_highest	Highest measured temperature.
temp[1-3]_reset_history	Reset history. Writing into this attribute will reset
			history for all attributes.

power[1-2]_label	"pout[1-2]". LTC3880 only.
power[1-2]_input	Measured power.

curr1_label		"iin". LTC3880 only.
curr1_input		Measured input current.
curr1_max		Maximum input current.
curr1_max_alarm		Input current high alarm.

curr[2-3]_label		"iout[1-2]". LTC3880 only.
curr[2-3]_input		Measured input current.
curr[2-3]_max		Maximum input current.
curr[2-3]_crit		Critical input current.
curr[2-3]_max_alarm	Input current high alarm.
curr[2-3]_crit_alarm	Input current critical high alarm.
Loading