summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/mcp3422.c
diff options
context:
space:
mode:
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>2017-06-28 23:53:09 +0200
committerJonathan Cameron <jic23@kernel.org>2017-07-02 11:24:51 +0200
commite3169994f6563f7e80a357ea68d5e9b040cb126c (patch)
tree65d5141fc6ac9ee82a1e62f992e96583342d68fa /drivers/iio/adc/mcp3422.c
parentiio: gyro: mpu3050: Allow open drain with anything (diff)
downloadlinux-e3169994f6563f7e80a357ea68d5e9b040cb126c.tar.xz
linux-e3169994f6563f7e80a357ea68d5e9b040cb126c.zip
iio: adc: mcp3422: Changing initial channel
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>
Diffstat (limited to 'drivers/iio/adc/mcp3422.c')
-rw-r--r--drivers/iio/adc/mcp3422.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
index 254135e07792..6737df8d9bdd 100644
--- a/drivers/iio/adc/mcp3422.c
+++ b/drivers/iio/adc/mcp3422.c
@@ -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);