12 #include <linux/slab.h>
13 #include <linux/kernel.h>
14 #include <linux/i2c.h>
15 #include <linux/bitops.h>
19 #include "../ring_sw.h"
25 const unsigned long *scan_mask)
40 static irqreturn_t max1363_trigger_handler(
int irq,
void *
p)
49 unsigned long numvals = bitmap_weight(st->
current_mode->modemask,
58 d_size +=
sizeof(
s64);
59 if (d_size %
sizeof(
s64))
60 d_size +=
sizeof(
s64) - (d_size %
sizeof(
s64));
79 time_ns = iio_get_time_ns();
82 memcpy(rxbuf + d_size -
sizeof(
s64), &time_ns,
sizeof(time_ns));
110 &max1363_trigger_handler,
118 goto error_deallocate_sw_rb;
121 indio_dev->
setup_ops = &max1363_ring_setup_ops;
128 error_deallocate_sw_rb: