Sat, Jan 27, 2024 at 06:03:58PM +0200, Petre Rodan kirjoitti: > Add triggered buffer feature. ... > +static irqreturn_t hsc_trigger_handler(int irq, void *private) > +{ > + struct iio_poll_func *pf = private; > + struct iio_dev *indio_dev = pf->indio_dev; > + struct hsc_data *data = iio_priv(indio_dev); > + int ret; > + > + ret = hsc_get_measurement(data); > + if (ret) > + goto error; > + memcpy(&data->scan.chan[0], &data->buffer, 2); You probably wanted here &data->buffer[0] as currently you use pointer to the poiner. > + memcpy(&data->scan.chan[1], &data->buffer[2], 2); Hmm... We don't have fixed-size memcpy() :-( > + iio_push_to_buffers_with_timestamp(indio_dev, &data->scan, > + iio_get_time_ns(indio_dev)); > + > +error: > + iio_trigger_notify_done(indio_dev->trig); > + > + return IRQ_HANDLED; > +} -- With Best Regards, Andy Shevchenko