Commit dcacccc5 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:adc:ad799x fix incorrect scan_type descriptions.

A few of these had the wrong shifts, which would lead to
userspace hacking off the top couple of bits.  Also, one
part had the wrong accuracy.
Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 630081fd
......@@ -506,16 +506,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7995] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
0, 0, IIO_ST('u', 10, 16, 0), 0),
0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
1, 1, IIO_ST('u', 10, 16, 0), 0),
1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
2, 2, IIO_ST('u', 10, 16, 0), 0),
2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
3, 3, IIO_ST('u', 10, 16, 0), 0),
3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
......@@ -524,16 +524,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7999] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
0, 0, IIO_ST('u', 10, 16, 0), 0),
0, 0, IIO_ST('u', 8, 16, 4), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
1, 1, IIO_ST('u', 10, 16, 0), 0),
1, 1, IIO_ST('u', 8, 16, 4), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
2, 2, IIO_ST('u', 10, 16, 0), 0),
2, 2, IIO_ST('u', 8, 16, 4), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
3, 3, IIO_ST('u', 10, 16, 0), 0),
3, 3, IIO_ST('u', 8, 16, 4), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
......@@ -555,16 +555,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7993] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
0, 0, IIO_ST('u', 10, 16, 0), 0),
0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
1, 1, IIO_ST('u', 10, 16, 0), 0),
1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
2, 2, IIO_ST('u', 10, 16, 0), 0),
2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
3, 3, IIO_ST('u', 10, 16, 0), 0),
3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4),
.num_channels = 5,
.int_vref_mv = 1024,
......@@ -593,28 +593,28 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
[ad7997] = {
.channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
0, 0, IIO_ST('u', 10, 16, 0), 0),
0, 0, IIO_ST('u', 10, 16, 2), 0),
.channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
1, 1, IIO_ST('u', 10, 16, 0), 0),
1, 1, IIO_ST('u', 10, 16, 2), 0),
.channel[2] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
2, 2, IIO_ST('u', 10, 16, 0), 0),
2, 2, IIO_ST('u', 10, 16, 2), 0),
.channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
3, 3, IIO_ST('u', 10, 16, 0), 0),
3, 3, IIO_ST('u', 10, 16, 2), 0),
.channel[4] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 4, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
4, 4, IIO_ST('u', 10, 16, 0), 0),
4, 4, IIO_ST('u', 10, 16, 2), 0),
.channel[5] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 5, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
5, 5, IIO_ST('u', 10, 16, 0), 0),
5, 5, IIO_ST('u', 10, 16, 2), 0),
.channel[6] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 6, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
6, 6, IIO_ST('u', 10, 16, 0), 0),
6, 6, IIO_ST('u', 10, 16, 2), 0),
.channel[7] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 7, 0,
(1 << IIO_CHAN_INFO_SCALE_SHARED),
7, 7, IIO_ST('u', 10, 16, 0), 0),
7, 7, IIO_ST('u', 10, 16, 2), 0),
.channel[8] = IIO_CHAN_SOFT_TIMESTAMP(8),
.num_channels = 9,
.int_vref_mv = 1024,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment