diff options
Diffstat (limited to 'drivers/staging/iio/adc/ad799x_core.c')
-rw-r--r-- | drivers/staging/iio/adc/ad799x_core.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c index b8efd59..b6662db 100644 --- a/drivers/staging/iio/adc/ad799x_core.c +++ b/drivers/staging/iio/adc/ad799x_core.c @@ -336,11 +336,11 @@ static irqreturn_t ad799x_event_handler(int irq, void *private) if (status & (1 << i)) iio_push_event(indio_dev, i & 0x1 ? - IIO_UNMOD_EVENT_CODE(IIO_IN, + IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE, (i >> 1), IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) : - IIO_UNMOD_EVENT_CODE(IIO_IN, + IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE, (i >> 1), IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING), @@ -486,16 +486,16 @@ static const struct iio_info ad7993_4_7_8_info = { static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { [ad7991] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 0, 0, IIO_ST('u', 12, 16, 0), 0), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 0, + .channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 1, 1, IIO_ST('u', 12, 16, 0), 0), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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', 12, 16, 0), 0), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 0, + .channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 3, 3, IIO_ST('u', 12, 16, 0), 0), .channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4), @@ -504,16 +504,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7991_info, }, [ad7995] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .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), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 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), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 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), .channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4), @@ -522,16 +522,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7991_info, }, [ad7999] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .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), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 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), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 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), .channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4), @@ -540,10 +540,10 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7991_info, }, [ad7992] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 0, 0, IIO_ST('u', 12, 16, 0), 0), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 0, + .channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 1, 1, IIO_ST('u', 12, 16, 0), 0), .channel[2] = IIO_CHAN_SOFT_TIMESTAMP(2), @@ -553,16 +553,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7992_info, }, [ad7993] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .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), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 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), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 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), .channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4), @@ -572,16 +572,16 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7993_4_7_8_info, }, [ad7994] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 0, 0, IIO_ST('u', 12, 16, 0), 0), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 0, + .channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 1, 1, IIO_ST('u', 12, 16, 0), 0), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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', 12, 16, 0), 0), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 0, + .channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 3, 3, IIO_ST('u', 12, 16, 0), 0), .channel[4] = IIO_CHAN_SOFT_TIMESTAMP(4), @@ -591,28 +591,28 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7993_4_7_8_info, }, [ad7997] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .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), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 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), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 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), - .channel[4] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 4, 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), - .channel[5] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 5, 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), - .channel[6] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 6, 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), - .channel[7] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 7, 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), .channel[8] = IIO_CHAN_SOFT_TIMESTAMP(8), @@ -622,28 +622,28 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .info = &ad7993_4_7_8_info, }, [ad7998] = { - .channel[0] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 0, 0, + .channel[0] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 0, 0, IIO_ST('u', 12, 16, 0), 0), - .channel[1] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 1, 0, + .channel[1] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 1, 1, IIO_ST('u', 12, 16, 0), 0), - .channel[2] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 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', 12, 16, 0), 0), - .channel[3] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 3, 0, + .channel[3] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 3, 3, IIO_ST('u', 12, 16, 0), 0), - .channel[4] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 4, 0, + .channel[4] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 4, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 4, 4, IIO_ST('u', 12, 16, 0), 0), - .channel[5] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 5, 0, + .channel[5] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 5, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 5, 5, IIO_ST('u', 12, 16, 0), 0), - .channel[6] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 6, 0, + .channel[6] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 6, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 6, 6, IIO_ST('u', 12, 16, 0), 0), - .channel[7] = IIO_CHAN(IIO_IN, 0, 1, 0, NULL, 7, 0, + .channel[7] = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 7, 0, (1 << IIO_CHAN_INFO_SCALE_SHARED), 7, 7, IIO_ST('u', 12, 16, 0), 0), .channel[8] = IIO_CHAN_SOFT_TIMESTAMP(8), |