Skip to content

Commit

Permalink
hwmon: Driver for ADT7410
Browse files Browse the repository at this point in the history
This patch brings basic support for the Analog Devices ADT7410 temperature
sensor. The following functionality has been implemented:

  * get current temperature
  * get/set minimum, maximum and critical temperature
  * get/set hysteresis
  * get alarm events for minimum, maximum and critical temperature

All implemented sysfs attributes have been sucessfully tested at temperatures
of 15°C to 40°C.

Signed-off-by: Hartmut Knaack <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
Hartmut Knaack authored and groeck committed Sep 24, 2012
1 parent 87432a2 commit 983b97b
Show file tree
Hide file tree
Showing 4 changed files with 521 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Documentation/hwmon/adt7410
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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 <[email protected]>

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
10 changes: 10 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ config SENSORS_ADM9240
This driver can also be built as a module. If so, the module
will be called adm9240.

config SENSORS_ADT7410
tristate "Analog Devices ADT7410"
depends on I2C && EXPERIMENTAL
help
If you say yes here you get support for the Analog Devices
ADT7410 temperature monitoring chip.

This driver can also be built as a module. If so, the module
will be called adt7410.

config SENSORS_ADT7411
tristate "Analog Devices ADT7411"
depends on I2C && EXPERIMENTAL
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ obj-$(CONFIG_SENSORS_ADM9240) += adm9240.o
obj-$(CONFIG_SENSORS_ADS1015) += ads1015.o
obj-$(CONFIG_SENSORS_ADS7828) += ads7828.o
obj-$(CONFIG_SENSORS_ADS7871) += ads7871.o
obj-$(CONFIG_SENSORS_ADT7410) += adt7410.o
obj-$(CONFIG_SENSORS_ADT7411) += adt7411.o
obj-$(CONFIG_SENSORS_ADT7462) += adt7462.o
obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o
Expand Down
Loading

0 comments on commit 983b97b

Please sign in to comment.