]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
iio: adc: mcp320x: support more differential voltage measurement
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 7 Jan 2016 15:40:30 +0000 (00:40 +0900)
committerJonathan Cameron <jic23@kernel.org>
Sat, 16 Jan 2016 13:04:05 +0000 (13:04 +0000)
commit4ea71e5cee8ad52407ee95c3548d0887eedae301
tree4e5bb7df6d56631f15c27b53a992bfac6236b897
parentb9cd7a254d17dac8098517afdebdac482e59aec4
iio: adc: mcp320x: support more differential voltage measurement

mcp320x driver supports the pseudo-differential mode by
in_voltage'IN+'-voltage'IN-'_raw where (IN+, IN-) = (0, 1), (2, 3), ...

mcp320x chips except MCP3X01 can also select swapped IN+ and IN-
pairs in the pseudo-differential mode.
i.e. in_voltage'IN+'-voltage'IN-'_raw where (IN+, IN-) = (1, 0),
(3, 2), ...

If the voltage level of IN+ is equal to or less than IN-, the
resultant code will be 000h.  So it is useful to provide these, too.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Oskar Andero <oskar.andero@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/mcp320x.c