2019-04-17 09:46:28 +00:00
|
|
|
Kernel driver max197
|
|
|
|
====================
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
|
|
|
|
Author:
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
* Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
|
|
|
|
|
|
|
Supported chips:
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
* Maxim MAX197
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
Prefix: 'max197'
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf
|
|
|
|
|
|
|
|
* Maxim MAX199
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
Prefix: 'max199'
|
2019-04-17 09:46:28 +00:00
|
|
|
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
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
|
2019-04-17 09:46:28 +00:00
|
|
|
filled with a pointer to a conversion function, defined like::
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
|
|
|
|
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:
|
|
|
|
|
2019-04-17 09:46:28 +00:00
|
|
|
======= ========== ============================================
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
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
|
2019-04-17 09:46:28 +00:00
|
|
|
======= ========== ============================================
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
|
|
|
|
Sysfs interface
|
|
|
|
---------------
|
|
|
|
|
2019-04-17 09:46:28 +00:00
|
|
|
============== ==============================================================
|
|
|
|
in[0-7]_input The conversion value for the corresponding channel.
|
|
|
|
RO
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
|
2019-04-17 09:46:28 +00:00
|
|
|
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
|
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>
2012-08-31 01:42:57 +00:00
|
|
|
|
2019-04-17 09:46:28 +00:00
|
|
|
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
|
|
|
|
============== ==============================================================
|