[PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro

David Lechner posted 1 patch 1 week ago
drivers/iio/accel/ssp_accel_sensor.c            |  2 +-
drivers/iio/common/ssp_sensors/ssp_iio_sensor.h | 12 ------------
drivers/iio/gyro/ssp_gyro_sensor.c              |  2 +-
3 files changed, 2 insertions(+), 14 deletions(-)
[PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
Posted by David Lechner 1 week ago
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>
---
 drivers/iio/accel/ssp_accel_sensor.c            |  2 +-
 drivers/iio/common/ssp_sensors/ssp_iio_sensor.h | 12 ------------
 drivers/iio/gyro/ssp_gyro_sensor.c              |  2 +-
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/iio/accel/ssp_accel_sensor.c b/drivers/iio/accel/ssp_accel_sensor.c
index 3e572af2ec03..d1687cdd33ea 100644
--- a/drivers/iio/accel/ssp_accel_sensor.c
+++ b/drivers/iio/accel/ssp_accel_sensor.c
@@ -76,7 +76,7 @@ static const struct iio_chan_spec ssp_acc_channels[] = {
 	SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_X, SSP_CHANNEL_SCAN_INDEX_X),
 	SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_Y, SSP_CHANNEL_SCAN_INDEX_Y),
 	SSP_CHANNEL_AG(IIO_ACCEL, IIO_MOD_Z, SSP_CHANNEL_SCAN_INDEX_Z),
-	SSP_CHAN_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
+	IIO_CHAN_SOFT_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
 };
 
 static int ssp_process_accel_data(struct iio_dev *indio_dev, void *buf,
diff --git a/drivers/iio/common/ssp_sensors/ssp_iio_sensor.h b/drivers/iio/common/ssp_sensors/ssp_iio_sensor.h
index 4528ab55eb68..05fcad61c848 100644
--- a/drivers/iio/common/ssp_sensors/ssp_iio_sensor.h
+++ b/drivers/iio/common/ssp_sensors/ssp_iio_sensor.h
@@ -18,18 +18,6 @@
 		},\
 }
 
-/* It is defined here as it is a mixed timestamp */
-#define SSP_CHAN_TIMESTAMP(_si) {					\
-	.type = IIO_TIMESTAMP,						\
-	.channel = -1,							\
-	.scan_index = _si,						\
-	.scan_type = {							\
-		.sign = 's',						\
-		.realbits = 64,						\
-		.storagebits = 64,					\
-		},							\
-}
-
 #define SSP_MS_PER_S			1000
 #define SSP_INVERTED_SCALING_FACTOR	1000000U
 
diff --git a/drivers/iio/gyro/ssp_gyro_sensor.c b/drivers/iio/gyro/ssp_gyro_sensor.c
index d9b41cf8d799..1acbbc1eeec3 100644
--- a/drivers/iio/gyro/ssp_gyro_sensor.c
+++ b/drivers/iio/gyro/ssp_gyro_sensor.c
@@ -76,7 +76,7 @@ static const struct iio_chan_spec ssp_gyro_channels[] = {
 	SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_X, SSP_CHANNEL_SCAN_INDEX_X),
 	SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_Y, SSP_CHANNEL_SCAN_INDEX_Y),
 	SSP_CHANNEL_AG(IIO_ANGL_VEL, IIO_MOD_Z, SSP_CHANNEL_SCAN_INDEX_Z),
-	SSP_CHAN_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
+	IIO_CHAN_SOFT_TIMESTAMP(SSP_CHANNEL_SCAN_INDEX_TIME),
 };
 
 static int ssp_process_gyro_data(struct iio_dev *indio_dev, void *buf,

---
base-commit: 8678fb54958893818ddeccd05fea560a4e1fc759
change-id: 20260517-iio-ssp-timestamp-697751153752

Best regards,
--  
David Lechner <dlechner@baylibre.com>
Re: [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
Posted by Andy Shevchenko 6 days, 22 hours ago
On Sun, May 17, 2026 at 12:29:35PM -0500, David Lechner wrote:
> 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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
Posted by Jonathan Cameron 6 days, 14 hours ago
On Mon, 18 May 2026 10:25:22 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Sun, May 17, 2026 at 12:29:35PM -0500, David Lechner wrote:
> > 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.  
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
Applied.