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

Commit cc150a28 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull hwmon updates from Guenter Roeck:
 "New drivers for: MCP3221, ADT7410, MAX197

  Chip support added to existing drivers: LM71, LM74, MAX1110, MAX1112,
  MAX1113, INA220, INA230, MCP3221

  Cleanup: Use devm_ functions, fixed build warnings, removed deprecated
  sysfs attributes, code simplifications, dropped dependencies on
  EXPERIMENTAL"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (64 commits)
  hwmon: (mcp3021) Add MCP3221 support
  hwmon: (mcp3021) Prepare MCP3021 driver to support other chips
  hwmon: (w83791d) Drop unnecessary compare statements
  hwmon: (lm93) Drop unnecessary compare statement
  hwmon: (lm70) Simplify show_name function
  hwmon: (adcxx) Simplify show_name function
  hwmon: Drop dependencies on EXPERIMENTAL
  hwmon: (it87) Fix Kconfig for IT87 driver
  hwmon: (sht15) move header to linux/platform_data/
  hwmon: (asus_atk0110) Remove useless kfree
  hwmon: (ina2xx) Add support for INA220 and INA230
  hwmon: (ina2xx) Use structure array to distinguish chip types
  hwmon: (max1111) Add support for MAX1110, MAX1112, and MAX1113
  hwmon: (lm70) Add support for LM71 and LM74
  hwmon: (Documentation) Update feature-removal-schedule.txt
  hwmon: (w83793) Remove legacy chassis intrusion detection sysfs attributes
  hwmon: (w83792d) Remove legacy chassis intrusion detection attributes
  hwmon: (adm9240) Remove legacy chassis intrusion detection sysfs attribute
  hwmon: (lm70) Allow 4wire SPI bus with LM70
  hwmon: (sht15) remove multiple driver registration
  ...
parents d9a80746 592758b1
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -357,16 +357,6 @@ Who: Wey-Yi Guy <wey-yi.w.guy@intel.com>

----------------------------

What:	Legacy, non-standard chassis intrusion detection interface.
When:	June 2011
Why:	The adm9240, w83792d and w83793 hardware monitoring drivers have
	legacy interfaces for chassis intrusion detection. A standard
	interface has been added to each driver, so the legacy interface
	can be removed.
Who:	Jean Delvare <khali@linux-fr.org>

----------------------------

What:	i2c_driver.attach_adapter
	i2c_driver.detach_adapter
When:	September 2011
+51 −0
Original line number Diff line number Diff line
Kernel driver adt7410
=====================

Supported chips:
  * Analog Devices ADT7410
    Prefix: 'adt7410'
    Addresses scanned: I2C 0x48 - 0x4B
    Datasheet: Publicly available at the Analog Devices website
               http://www.analog.com/static/imported-files/data_sheets/ADT7410.pdf

Author: Hartmut Knaack <knaack.h@gmx.de>

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

The ADT7410 is a temperature sensor with rated temperature range of -55°C to
+150°C. It has a high accuracy of +/-0.5°C and can be operated at a resolution
of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an INT pin to
indicate that a minimum or maximum temperature set point has been exceeded, as
well as a critical temperature (CT) pin to indicate that the critical
temperature set point has been exceeded. Both pins can be set up with a common
hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events. Both
pins can individually set to be active-low or active-high, while the whole
device can either run in comparator mode or interrupt mode. The ADT7410
supports continous temperature sampling, as well as sampling one temperature
value per second or even justget one sample on demand for power saving.
Besides, it can completely power down its ADC, if power management is
required.

Configuration Notes
-------------------

Since the device uses one hysteresis value, which is an offset to minimum,
maximum and critical temperature, it can only be set for temp#_max_hyst.
However, temp#_min_hyst and temp#_crit_hyst show their corresponding
hysteresis.
The device is set to 16 bit resolution and comparator mode.

sysfs-Interface
---------------

temp#_input		- temperature input
temp#_min		- temperature minimum setpoint
temp#_max		- temperature maximum setpoint
temp#_crit		- critical temperature setpoint
temp#_min_hyst		- hysteresis for temperature minimum (read-only)
temp#_max_hyst		- hysteresis for temperature maximum (read/write)
temp#_crit_hyst		- hysteresis for critical temperature (read-only)
temp#_min_alarm		- temperature minimum alarm flag
temp#_max_alarm		- temperature maximum alarm flag
temp#_crit_alarm	- critical temperature alarm flag
+18 −0
Original line number Diff line number Diff line
@@ -8,12 +8,24 @@ Supported chips:
    Datasheet: Publicly available at the Texas Instruments website
               http://www.ti.com/

  * Texas Instruments INA220
    Prefix: 'ina220'
    Addresses: I2C 0x40 - 0x4f
    Datasheet: Publicly available at the Texas Instruments website
               http://www.ti.com/

  * Texas Instruments INA226
    Prefix: 'ina226'
    Addresses: I2C 0x40 - 0x4f
    Datasheet: Publicly available at the Texas Instruments website
               http://www.ti.com/

  * Texas Instruments INA230
    Prefix: 'ina230'
    Addresses: I2C 0x40 - 0x4f
    Datasheet: Publicly available at the Texas Instruments website
               http://www.ti.com/

Author: Lothar Felten <l-felten@ti.com>

Description
@@ -23,7 +35,13 @@ The INA219 is a high-side current shunt and power monitor with an I2C
interface. The INA219 monitors both shunt drop and supply voltage, with
programmable conversion times and filtering.

The INA220 is a high or low side current shunt and power monitor with an I2C
interface. The INA220 monitors both shunt drop and supply voltage.

The INA226 is a current shunt and power monitor with an I2C interface.
The INA226 monitors both a shunt voltage drop and bus supply voltage.

The INA230 is a high or low side current shunt and power monitor with an I2C
interface. The INA230 monitors both a shunt voltage drop and bus supply voltage.

The shunt value in micro-ohms can be set via platform data.
+9 −3
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ Supported chips:
    Datasheet: http://www.national.com/pf/LM/LM70.html
  * Texas Instruments TMP121/TMP123
    Information: http://focus.ti.com/docs/prod/folders/print/tmp121.html
  * National Semiconductor LM71
    Datasheet: http://www.ti.com/product/LM71
  * National Semiconductor LM74
    Datasheet: http://www.ti.com/product/LM74

Author:
        Kaiwan N Billimoria <kaiwan@designergraphix.com>
@@ -31,9 +35,11 @@ As a real (in-tree) example of this "SPI protocol driver" interfacing
with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
and its associated documentation.

The TMP121/TMP123 are very similar; main differences are 4 wire SPI inter-
face (read only) and 13-bit temperature data (0.0625 degrees celsius reso-
lution).
The LM74 and TMP121/TMP123 are very similar; main difference is 13-bit
temperature data (0.0625 degrees celsius resolution).

The LM71 is also very similar; main difference is 14-bit temperature
data (0.03125 degrees celsius resolution).

Thanks to
---------
+60 −0
Original line number Diff line number Diff line
Maxim MAX197 driver
===================

Author:
  * Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Supported chips:
  * Maxim MAX197
    Prefix: 'max197'
    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf

  * Maxim MAX199
    Prefix: 'max199'
    Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf

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

The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V,
12-Bit DAS with 8+4 Bus Interface and Fault Protection.

The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V,
while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199.

Platform data
-------------

The MAX197 platform data (defined in linux/platform_data/max197.h) should be
filled with a pointer to a conversion function, defined like:

    int convert(u8 ctrl);

ctrl is the control byte to write to start a new conversion.
On success, the function must return the 12-bit raw value read from the chip,
or a negative error code otherwise.

Control byte format:

Bit     Name       Description
7,6     PD1,PD0    Clock and Power-Down modes
5       ACQMOD     Internal or External Controlled Acquisition
4       RNG        Full-scale voltage magnitude at the input
3       BIP        Unipolar or Bipolar conversion mode
2,1,0   A2,A1,A0   Channel

Sysfs interface
---------------

* in[0-7]_input: The conversion value for the corresponding channel.
                 RO

* in[0-7]_min:   The lower limit (in mV) for the corresponding channel.
                 For the MAX197, it will be adjusted to -10000, -5000, or 0.
                 For the MAX199, it will be adjusted to -4000, -2000, or 0.
                 RW

* in[0-7]_max:   The higher limit (in mV) for the corresponding channel.
                 For the MAX197, it will be adjusted to 0, 5000, or 10000.
                 For the MAX199, it will be adjusted to 0, 2000, or 4000.
                 RW
Loading