Commit f8087abc authored by Alison Schofield's avatar Alison Schofield Committed by Greg Kroah-Hartman

staging: iio: dummy: use uppercase descriptors for enum names

Replace lower case names in the enum dummy_scan_elements with
uppercase names and a descriptive prefix: DUMMY_INDEX_
Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31a99443
...@@ -137,7 +137,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = { ...@@ -137,7 +137,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
*/ */
.info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ), .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ),
/* The ordering of elements in the buffer via an enum */ /* The ordering of elements in the buffer via an enum */
.scan_index = voltage0, .scan_index = DUMMY_INDEX_VOLTAGE_0,
.scan_type = { /* Description of storage in buffer */ .scan_type = { /* Description of storage in buffer */
.sign = 'u', /* unsigned */ .sign = 'u', /* unsigned */
.realbits = 13, /* 13 bits */ .realbits = 13, /* 13 bits */
...@@ -176,7 +176,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = { ...@@ -176,7 +176,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
* sampling_frequency * sampling_frequency
* The frequency in Hz at which the channels are sampled * The frequency in Hz at which the channels are sampled
*/ */
.scan_index = diffvoltage1m2, .scan_index = DUMMY_INDEX_DIFFVOLTAGE_1M2,
.scan_type = { /* Description of storage in buffer */ .scan_type = { /* Description of storage in buffer */
.sign = 's', /* signed */ .sign = 's', /* signed */
.realbits = 12, /* 12 bits */ .realbits = 12, /* 12 bits */
...@@ -194,7 +194,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = { ...@@ -194,7 +194,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
.info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ), .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ),
.scan_index = diffvoltage3m4, .scan_index = DUMMY_INDEX_DIFFVOLTAGE_3M4,
.scan_type = { .scan_type = {
.sign = 's', .sign = 's',
.realbits = 11, .realbits = 11,
...@@ -221,7 +221,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = { ...@@ -221,7 +221,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
BIT(IIO_CHAN_INFO_CALIBSCALE) | BIT(IIO_CHAN_INFO_CALIBSCALE) |
BIT(IIO_CHAN_INFO_CALIBBIAS), BIT(IIO_CHAN_INFO_CALIBBIAS),
.info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ), .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ),
.scan_index = accelx, .scan_index = DUMMY_INDEX_ACCELX,
.scan_type = { /* Description of storage in buffer */ .scan_type = { /* Description of storage in buffer */
.sign = 's', /* signed */ .sign = 's', /* signed */
.realbits = 16, /* 16 bits */ .realbits = 16, /* 16 bits */
......
...@@ -98,18 +98,18 @@ iio_simple_dummy_events_unregister(struct iio_dev *indio_dev) ...@@ -98,18 +98,18 @@ iio_simple_dummy_events_unregister(struct iio_dev *indio_dev)
/** /**
* enum iio_simple_dummy_scan_elements - scan index enum * enum iio_simple_dummy_scan_elements - scan index enum
* @voltage0: the single ended voltage channel * @DUMMY_INDEX_VOLTAGE_0: the single ended voltage channel
* @diffvoltage1m2: first differential channel * @DUMMY_INDEX_DIFFVOLTAGE_1M2: first differential channel
* @diffvoltage3m4: second differenial channel * @DUMMY_INDEX_DIFFVOLTAGE_3M4: second differential channel
* @accelx: acceleration channel * @DUMMY_INDEX_ACCELX: acceleration channel
* *
* Enum provides convenient numbering for the scan index. * Enum provides convenient numbering for the scan index.
*/ */
enum iio_simple_dummy_scan_elements { enum iio_simple_dummy_scan_elements {
voltage0, DUMMY_INDEX_VOLTAGE_0,
diffvoltage1m2, DUMMY_INDEX_DIFFVOLTAGE_1M2,
diffvoltage3m4, DUMMY_INDEX_DIFFVOLTAGE_3M4,
accelx, DUMMY_INDEX_ACCELX,
}; };
#ifdef CONFIG_IIO_SIMPLE_DUMMY_BUFFER #ifdef CONFIG_IIO_SIMPLE_DUMMY_BUFFER
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
/* Some fake data */ /* Some fake data */
static const s16 fakedata[] = { static const s16 fakedata[] = {
[voltage0] = 7, [DUMMY_INDEX_VOLTAGE_0] = 7,
[diffvoltage1m2] = -33, [DUMMY_INDEX_DIFFVOLTAGE_1M2] = -33,
[diffvoltage3m4] = -2, [DUMMY_INDEX_DIFFVOLTAGE_3M4] = -2,
[accelx] = 344, [DUMMY_INDEX_ACCELX] = 344,
}; };
/** /**
......
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