Skip to content

Commit 97caa67

Browse files
dlechjic23
authored andcommitted
iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
Remove the SSP_CHAN_TIMESTAMP() macro and replace users with the IIO_CHAN_SOFT_TIMESTAMP() macro. The SSP_CHAN_TIMESTAMP() macro is identical to the IIO_CHAN_SOFT_TIMESTAMP() macro, so we don't need a separate macro for it. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 6bce70d commit 97caa67

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

drivers/iio/accel/ssp_accel_sensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static const struct iio_chan_spec ssp_acc_channels[] = {
7676
SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_X, SSP_CHANNEL_SCAN_INDEX_X),
7777
SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_Y, SSP_CHANNEL_SCAN_INDEX_Y),
7878
SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_Z, SSP_CHANNEL_SCAN_INDEX_Z),
79-
SSP_CHAN_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
79+
IIO_CHAN_SOFT_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
8080
};
8181

8282
static int ssp_process_accel_data(struct iio_dev *indio_dev, void *buf,

drivers/iio/common/ssp_sensors/ssp_iio_sensor.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@
1818
},\
1919
}
2020

21-
/* It is defined here as it is a mixed timestamp */
22-
#define SSP_CHAN_TIMESTAMP(_si) { \
23-
.type = IIO_TIMESTAMP, \
24-
.channel = -1, \
25-
.scan_index = _si, \
26-
.scan_type = { \
27-
.sign = 's', \
28-
.realbits = 64, \
29-
.storagebits = 64, \
30-
}, \
31-
}
32-
3321
#define SSP_MS_PER_S 1000
3422
#define SSP_INVERTED_SCALING_FACTOR 1000000U
3523

drivers/iio/gyro/ssp_gyro_sensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static const struct iio_chan_spec ssp_gyro_channels[] = {
7676
SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_X, SSP_CHANNEL_SCAN_INDEX_X),
7777
SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_Y, SSP_CHANNEL_SCAN_INDEX_Y),
7878
SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_Z, SSP_CHANNEL_SCAN_INDEX_Z),
79-
SSP_CHAN_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
79+
IIO_CHAN_SOFT_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
8080
};
8181

8282
static int ssp_process_gyro_data(struct iio_dev *indio_dev, void *buf,

0 commit comments

Comments
 (0)