iio: adc: mcp3422: Changing initial channel
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>
Wed, 28 Jun 2017 21:53:09 +0000 (23:53 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Jul 2017 09:24:51 +0000 (10:24 +0100)
Initial channel should be the first available channel on
all configurations, so changing to channel 0 available on
all supported chips.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Reported-by: Maarten Brock <m.brock@vanmierlo.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/mcp3422.c

index 254135e07792295c886adcee861ccca960b317da..6737df8d9bdd0a9206e71b2cb42ab25de121dc5e 100644 (file)
@@ -379,7 +379,7 @@ static int mcp3422_probe(struct i2c_client *client,
 
        /* meaningful default configuration */
        config = (MCP3422_CONT_SAMPLING
-               | MCP3422_CHANNEL_VALUE(1)
+               | MCP3422_CHANNEL_VALUE(0)
                | MCP3422_PGA_VALUE(MCP3422_PGA_1)
                | MCP3422_SAMPLE_RATE_VALUE(MCP3422_SRATE_240));
        mcp3422_update_config(adc, config);