Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326191
b: refs/heads/master
c: 6c1fe72
h: refs/heads/master
i:
  326189: 356dbc7
  326187: 740a517
  326183: 1e52aca
  326175: 75152c3
v: v3
  • Loading branch information
Vivien Didelot authored and Guenter Roeck committed Sep 24, 2012
1 parent fbd0ce3 commit a58beec
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37f9648b2745fc3830f3715a601f7f94296de838
refs/heads/master: 6c1fe725fd76f4328e22c146d3a36513963a01ea
60 changes: 60 additions & 0 deletions trunk/Documentation/hwmon/max197
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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
9 changes: 9 additions & 0 deletions trunk/drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,15 @@ config SENSORS_MAX1668
This driver can also be built as a module. If so, the module
will be called max1668.

config SENSORS_MAX197
tristate "Maxim MAX197 and compatibles"
help
Support for the Maxim MAX197 A/D converter.
Support will include, but not be limited to, MAX197, and MAX199.

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

config SENSORS_MAX6639
tristate "Maxim MAX6639 sensor chip"
depends on I2C && EXPERIMENTAL
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ obj-$(CONFIG_SENSORS_MAX1111) += max1111.o
obj-$(CONFIG_SENSORS_MAX16065) += max16065.o
obj-$(CONFIG_SENSORS_MAX1619) += max1619.o
obj-$(CONFIG_SENSORS_MAX1668) += max1668.o
obj-$(CONFIG_SENSORS_MAX197) += max197.o
obj-$(CONFIG_SENSORS_MAX6639) += max6639.o
obj-$(CONFIG_SENSORS_MAX6642) += max6642.o
obj-$(CONFIG_SENSORS_MAX6650) += max6650.o
Expand Down
Loading

0 comments on commit a58beec

Please sign in to comment.