iio: chemical: scd4x: expose timestamp channel

Timestamps were already written to the buffer in
scd4x_trigger_handler(), this patch makes them available as a channel.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Fiona Klute 2025-12-18 16:12:05 +01:00 committed by Jonathan Cameron
parent 4ea6e9b507
commit e7324980fa

View File

@ -59,6 +59,8 @@ enum scd4x_channel_idx {
SCD4X_CO2,
SCD4X_TEMP,
SCD4X_HR,
/* kernel timestamp, at the end of buffer */
SCD4X_TS,
};
struct scd4x_state {
@ -615,6 +617,7 @@ static const struct iio_chan_spec scd4x_channels[] = {
.endianness = IIO_BE,
},
},
IIO_CHAN_SOFT_TIMESTAMP(SCD4X_TS),
};
static int scd4x_suspend(struct device *dev)