Skip to content
  • Akinobu Mita's avatar
    iio: adc: mcp320x: support more differential voltage measurement · 4ea71e5c
    Akinobu Mita authored
    
    
    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: default avatarAkinobu 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: default avatarJonathan Cameron <jic23@kernel.org>
    4ea71e5c