diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-12 06:38:46 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 00:16:38 -0400 |
commit | 51c2a4871c1b47255ff8d74f0a86b2a0defff319 (patch) | |
tree | 151e26fe0ff76d26dc69eb55d3f15562d598ea72 /Documentation/hwmon/adt7410 | |
parent | c55dc91e92bdf21427dd8f5ad779ed9d63caacbd (diff) |
hwmon: (adt7410) Add support for the adt7310/adt7320
The adt7310/adt7320 is the SPI version of the adt7410/adt7420. The register map
layout is a bit different, i.e. the register addresses differ between the two
variants, but the bit layouts of the individual registers are identical. So both
chip variants can easily be supported by the same driver. The issue of non
matching register address layouts is solved by a simple look-up table which
translates the I2C addresses to the SPI addresses.
The patch moves the bulk of the adt7410 driver to a common module that will be
shared by the adt7410 and adt7310 drivers. This common module implements the
driver logic and uses a set of virtual functions to perform IO access. The
adt7410 and adt7310 driver modules provide proper implementations of these IO
accessor functions for I2C respective SPI.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon/adt7410')
-rw-r--r-- | Documentation/hwmon/adt7410 | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410 index 58150c480e56..9817941e5f19 100644 --- a/Documentation/hwmon/adt7410 +++ b/Documentation/hwmon/adt7410 | |||
@@ -12,29 +12,42 @@ Supported chips: | |||
12 | Addresses scanned: None | 12 | Addresses scanned: None |
13 | Datasheet: Publicly available at the Analog Devices website | 13 | Datasheet: Publicly available at the Analog Devices website |
14 | http://www.analog.com/static/imported-files/data_sheets/ADT7420.pdf | 14 | http://www.analog.com/static/imported-files/data_sheets/ADT7420.pdf |
15 | * Analog Devices ADT7310 | ||
16 | Prefix: 'adt7310' | ||
17 | Addresses scanned: None | ||
18 | Datasheet: Publicly available at the Analog Devices website | ||
19 | http://www.analog.com/static/imported-files/data_sheets/ADT7310.pdf | ||
20 | * Analog Devices ADT7320 | ||
21 | Prefix: 'adt7320' | ||
22 | Addresses scanned: None | ||
23 | Datasheet: Publicly available at the Analog Devices website | ||
24 | http://www.analog.com/static/imported-files/data_sheets/ADT7320.pdf | ||
15 | 25 | ||
16 | Author: Hartmut Knaack <knaack.h@gmx.de> | 26 | Author: Hartmut Knaack <knaack.h@gmx.de> |
17 | 27 | ||
18 | Description | 28 | Description |
19 | ----------- | 29 | ----------- |
20 | 30 | ||
21 | The ADT7410 is a temperature sensor with rated temperature range of -55°C to | 31 | The ADT7310/ADT7410 is a temperature sensor with rated temperature range of |
22 | +150°C. It has a high accuracy of +/-0.5°C and can be operated at a resolution | 32 | -55°C to +150°C. It has a high accuracy of +/-0.5°C and can be operated at a |
23 | of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an INT pin to | 33 | resolution of 13 bits (0.0625°C) or 16 bits (0.0078°C). The sensor provides an |
24 | indicate that a minimum or maximum temperature set point has been exceeded, as | 34 | INT pin to indicate that a minimum or maximum temperature set point has been |
25 | well as a critical temperature (CT) pin to indicate that the critical | 35 | exceeded, as well as a critical temperature (CT) pin to indicate that the |
26 | temperature set point has been exceeded. Both pins can be set up with a common | 36 | critical temperature set point has been exceeded. Both pins can be set up with a |
27 | hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events. Both | 37 | common hysteresis of 0°C - 15°C and a fault queue, ranging from 1 to 4 events. |
28 | pins can individually set to be active-low or active-high, while the whole | 38 | Both pins can individually set to be active-low or active-high, while the whole |
29 | device can either run in comparator mode or interrupt mode. The ADT7410 | 39 | device can either run in comparator mode or interrupt mode. The ADT7410 supports |
30 | supports continous temperature sampling, as well as sampling one temperature | 40 | continuous temperature sampling, as well as sampling one temperature value per |
31 | value per second or even justget one sample on demand for power saving. | 41 | second or even just get one sample on demand for power saving. Besides, it can |
32 | Besides, it can completely power down its ADC, if power management is | 42 | completely power down its ADC, if power management is required. |
33 | required. | 43 | |
34 | 44 | The ADT7320/ADT7420 is register compatible, the only differences being the | |
35 | The ADT7420 is register compatible, the only differences being the package, | 45 | package, a slightly narrower operating temperature range (-40°C to +150°C), and |
36 | a slightly narrower operating temperature range (-40°C to +150°C), and a | 46 | a better accuracy (0.25°C instead of 0.50°C.) |
37 | better accuracy (0.25°C instead of 0.50°C.) | 47 | |
48 | The difference between the ADT7310/ADT7320 and ADT7410/ADT7420 is the control | ||
49 | interface, the ADT7310 and ADT7320 use SPI while the ADT7410 and ADT7420 use | ||
50 | I2C. | ||
38 | 51 | ||
39 | Configuration Notes | 52 | Configuration Notes |
40 | ------------------- | 53 | ------------------- |