staging:iio: rename gyro channels to anglvel
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 5 Oct 2011 14:27:59 +0000 (15:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 5 Oct 2011 20:47:46 +0000 (13:47 -0700)
Ensure naming reflects what is measured, not how it is done.
Resolvers can measure the same thing for starters.
IIO_GYRO->IIO_ANGL_VEL to ensure consistent naming.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/gyro/adis16060_core.c
drivers/staging/iio/gyro/adis16080_core.c
drivers/staging/iio/gyro/adis16130_core.c
drivers/staging/iio/gyro/adis16260_core.c
drivers/staging/iio/gyro/adxrs450_core.c
drivers/staging/iio/iio.h
drivers/staging/iio/imu/adis16400_core.c
drivers/staging/iio/industrialio-core.c

index f81299160719f3a91a951a26e6f0528abfe564a8..abb6f05ce3db49ff99a418d5c841463e48a57e7b 100644 (file)
@@ -117,7 +117,7 @@ static const struct iio_info adis16060_info = {
 
 static const struct iio_chan_spec adis16060_channels[] = {
        {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .address = ADIS16060_GYRO,
index a2ee9beda8018440065df5d99fb567f7d4c1d8a8..07b013a115900b843113efdfabc5fb492571857a 100644 (file)
@@ -108,7 +108,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev,
 
 static const struct iio_chan_spec adis16080_channels[] = {
        {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .address = ADIS16080_DIN_GYRO,
index a9f270e5eb96d74406684f147d8f9af56bf15cb3..87670c01f88df83ee1e1db42f8b8f8e54834ebd6 100644 (file)
@@ -97,7 +97,7 @@ static int adis16130_read_raw(struct iio_dev *indio_dev,
 
 static const struct iio_chan_spec adis16130_channels[] = {
        {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .address = ADIS16130_RATEDATA,
index efbee2793843442a9d18f0cdc812de39fe344dca..dc440d15f86a563796c8dccf9e8d40596b35f379 100644 (file)
@@ -390,7 +390,7 @@ enum adis16260_channel {
 };
 #define ADIS16260_GYRO_CHANNEL_SET(axis, mod)                          \
        struct iio_chan_spec adis16260_channels_##axis[] = {            \
-               IIO_CHAN(IIO_GYRO, 1, 0, 0, NULL, 0, mod,               \
+               IIO_CHAN(IIO_ANGL_VEL, 1, 0, 0, NULL, 0, mod,           \
                         (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |      \
                         (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE) |     \
                         (1 << IIO_CHAN_INFO_SCALE_SEPARATE),           \
@@ -468,7 +468,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
        case (1 << IIO_CHAN_INFO_SCALE_SEPARATE):
        case (1 << IIO_CHAN_INFO_SCALE_SHARED):
                switch (chan->type) {
-               case IIO_GYRO:
+               case IIO_ANGL_VEL:
                        *val = 0;
                        if (spi_get_device_id(st->us)->driver_data)
                                *val2 = 320;
@@ -495,7 +495,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
                return IIO_VAL_INT;
        case (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE):
                switch (chan->type) {
-               case IIO_GYRO:
+               case IIO_ANGL_VEL:
                        bits = 12;
                        break;
                default:
@@ -515,7 +515,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
                return IIO_VAL_INT;
        case (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE):
                switch (chan->type) {
-               case IIO_GYRO:
+               case IIO_ANGL_VEL:
                        bits = 12;
                        break;
                default:
index 670b615839fb50415f313f060512f55eef14242c..1fda3db1739ed8f11267d22e11690ab36c003496 100644 (file)
@@ -268,7 +268,7 @@ static int adxrs450_read_raw(struct iio_dev *indio_dev,
        switch (mask) {
        case 0:
                switch (chan->type) {
-               case IIO_GYRO:
+               case IIO_ANGL_VEL:
                        ret = adxrs450_spi_sensor_data(indio_dev, &t);
                        if (ret)
                                break;
@@ -305,7 +305,7 @@ static int adxrs450_read_raw(struct iio_dev *indio_dev,
 
 static const struct iio_chan_spec adxrs450_channels[] = {
        {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
index 2a6c6731b3c67cdbe414c86e295c65cbccf87980..e7c286581a38efe6ffcc70777480feabd611bb8f 100644 (file)
@@ -31,7 +31,7 @@ enum iio_chan_type {
        IIO_CURRENT,
        IIO_POWER,
        IIO_ACCEL,
-       IIO_GYRO,
+       IIO_ANGL_VEL,
        IIO_MAGN,
        IIO_LIGHT,
        IIO_INTENSITY,
index 07d5a61eaa72f9b02f3894384ab9751b0cdac052..365f99ae86e653a4fd468e78e1fc8349f55990be 100644 (file)
@@ -507,7 +507,7 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
        case (1 << IIO_CHAN_INFO_SCALE_SHARED):
        case (1 << IIO_CHAN_INFO_SCALE_SEPARATE):
                switch (chan->type) {
-               case IIO_GYRO:
+               case IIO_ANGL_VEL:
                        *val = 0;
                        *val2 = st->variant->gyro_scale_micro;
                        return IIO_VAL_INT_PLUS_MICRO;
@@ -565,7 +565,7 @@ static struct iio_chan_spec adis16400_channels[] = {
                .scan_index = ADIS16400_SCAN_SUPPLY,
                .scan_type = IIO_ST('u', 14, 16, 0)
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -574,7 +574,7 @@ static struct iio_chan_spec adis16400_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_X,
                .scan_type = IIO_ST('s', 14, 16, 0)
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -583,7 +583,7 @@ static struct iio_chan_spec adis16400_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_Y,
                .scan_type = IIO_ST('s', 14, 16, 0),
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -674,7 +674,7 @@ static struct iio_chan_spec adis16350_channels[] = {
                .scan_index = ADIS16400_SCAN_SUPPLY,
                .scan_type = IIO_ST('u', 12, 16, 0)
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -683,7 +683,7 @@ static struct iio_chan_spec adis16350_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_X,
                .scan_type = IIO_ST('s', 14, 16, 0)
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -692,7 +692,7 @@ static struct iio_chan_spec adis16350_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_Y,
                .scan_type = IIO_ST('s', 14, 16, 0),
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -780,7 +780,7 @@ static struct iio_chan_spec adis16300_channels[] = {
                .scan_index = ADIS16400_SCAN_SUPPLY,
                .scan_type = IIO_ST('u', 12, 16, 0)
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -854,7 +854,7 @@ static struct iio_chan_spec adis16300_channels[] = {
 
 static const struct iio_chan_spec adis16334_channels[] = {
        {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -863,7 +863,7 @@ static const struct iio_chan_spec adis16334_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_X,
                .scan_type = IIO_ST('s', 14, 16, 0),
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
@@ -872,7 +872,7 @@ static const struct iio_chan_spec adis16334_channels[] = {
                .scan_index = ADIS16400_SCAN_GYRO_Y,
                .scan_type = IIO_ST('s', 14, 16, 0),
        }, {
-               .type = IIO_GYRO,
+               .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
                .info_mask = (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) |
index 647a4052a8cb7293aa1db548ee4cf2a9c9f7a917..5a6dde85ec8f8db093485d8ca4c9a7beb1f7a554 100644 (file)
@@ -54,7 +54,7 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_CURRENT] = "current",
        [IIO_POWER] = "power",
        [IIO_ACCEL] = "accel",
-       [IIO_GYRO] = "gyro",
+       [IIO_ANGL_VEL] = "anglvel",
        [IIO_MAGN] = "magn",
        [IIO_LIGHT] = "illuminance",
        [IIO_INTENSITY] = "intensity",