m adxl313_chans { > chan_x, chan_y, chan_z, > }; > @@ -238,6 +264,14 @@ static const struct iio_chan_spec adxl313_channels[] = { > ADXL313_ACCEL_CHANNEL(0, chan_x, X), > ADXL313_ACCEL_CHANNEL(1, chan_y, Y), > ADXL313_ACCEL_CHANNEL(2, chan_z, Z), > + { > + .type = IIO_ACCEL, > + .modified = 1, > + .channel2 = IIO_MOD_X_AND_Y_AND_Z, I'm confused. If this is for activity it would be very unusual for it to be X&Y&Z. "A setting of 1 enables x-, y-, or z-axis participation in detecting activity or inactivity. A setting of 0 excludes the selected axis from participation. If all axes are excluded, the function is disabled. For activity detection, all participating axes are logically OR’ed, causing the activity function to trigger when any of the participating axes exceeds the threshold. For inactivity detection, all participating axes are logically AND’ed, causing the inactivity function to trigger only if all participating axes are below the threshold for the specified period of time." Which matches with what I'd expect. > + .scan_index = -1, /* Fake channel for axis AND'ing */ > + .event_spec = adxl313_fake_chan_events, > + .num_event_specs = ARRAY_SIZE(adxl313_fake_chan_events), > + }, > }; > > static const unsigned long adxl313_scan_masks[] = { > @@ -300,6 +334,60 @@ static int adxl313_read_freq_avail(struct iio_dev *indio_dev, > } > }