* [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
@ 2026-05-17 17:29 David Lechner
2026-05-18 7:25 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: David Lechner @ 2026-05-17 17:29 UTC (permalink / raw)
To: Jonathan Cameron, Nuno Sá, Andy Shevchenko
Cc: linux-iio, linux-kernel, David Lechner
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>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
2026-05-17 17:29 [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro David Lechner
@ 2026-05-18 7:25 ` Andy Shevchenko
2026-05-18 15:34 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-05-18 7:25 UTC (permalink / raw)
To: David Lechner
Cc: Jonathan Cameron, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro
2026-05-18 7:25 ` Andy Shevchenko
@ 2026-05-18 15:34 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2026-05-18 15:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-18 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 17:29 [PATCH] iio: common: ssp: remove SSP_CHAN_TIMESTAMP() macro David Lechner
2026-05-18 7:25 ` Andy Shevchenko
2026-05-18 15:34 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox