diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2012-08-30 21:42:57 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2012-09-24 00:08:33 -0400 |
commit | 6c1fe725fd76f4328e22c146d3a36513963a01ea (patch) | |
tree | 23c2fabf8c2e38beac375353dde793138366a37c /Documentation/hwmon | |
parent | 37f9648b2745fc3830f3715a601f7f94296de838 (diff) |
hwmon: add Maxim MAX197 support
The MAX197 is an A/D converter, made by Maxim. This driver currently
supports the MAX197, and MAX199. They 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.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon')
-rw-r--r-- | Documentation/hwmon/max197 | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Documentation/hwmon/max197 b/Documentation/hwmon/max197 new file mode 100644 index 000000000000..8d89b9009df8 --- /dev/null +++ b/Documentation/hwmon/max197 | |||
@@ -0,0 +1,60 @@ | |||
1 | Maxim MAX197 driver | ||
2 | =================== | ||
3 | |||
4 | Author: | ||
5 | * Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
6 | |||
7 | Supported chips: | ||
8 | * Maxim MAX197 | ||
9 | Prefix: 'max197' | ||
10 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf | ||
11 | |||
12 | * Maxim MAX199 | ||
13 | Prefix: 'max199' | ||
14 | Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf | ||
15 | |||
16 | Description | ||
17 | ----------- | ||
18 | |||
19 | The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V, | ||
20 | 12-Bit DAS with 8+4 Bus Interface and Fault Protection. | ||
21 | |||
22 | The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V, | ||
23 | while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199. | ||
24 | |||
25 | Platform data | ||
26 | ------------- | ||
27 | |||
28 | The MAX197 platform data (defined in linux/platform_data/max197.h) should be | ||
29 | filled with a pointer to a conversion function, defined like: | ||
30 | |||
31 | int convert(u8 ctrl); | ||
32 | |||
33 | ctrl is the control byte to write to start a new conversion. | ||
34 | On success, the function must return the 12-bit raw value read from the chip, | ||
35 | or a negative error code otherwise. | ||
36 | |||
37 | Control byte format: | ||
38 | |||
39 | Bit Name Description | ||
40 | 7,6 PD1,PD0 Clock and Power-Down modes | ||
41 | 5 ACQMOD Internal or External Controlled Acquisition | ||
42 | 4 RNG Full-scale voltage magnitude at the input | ||
43 | 3 BIP Unipolar or Bipolar conversion mode | ||
44 | 2,1,0 A2,A1,A0 Channel | ||
45 | |||
46 | Sysfs interface | ||
47 | --------------- | ||
48 | |||
49 | * in[0-7]_input: The conversion value for the corresponding channel. | ||
50 | RO | ||
51 | |||
52 | * in[0-7]_min: The lower limit (in mV) for the corresponding channel. | ||
53 | For the MAX197, it will be adjusted to -10000, -5000, or 0. | ||
54 | For the MAX199, it will be adjusted to -4000, -2000, or 0. | ||
55 | RW | ||
56 | |||
57 | * in[0-7]_max: The higher limit (in mV) for the corresponding channel. | ||
58 | For the MAX197, it will be adjusted to 0, 5000, or 10000. | ||
59 | For the MAX199, it will be adjusted to 0, 2000, or 4000. | ||
60 | RW | ||