.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ BIT(IIO_CHAN_INFO_CALIBBIAS), \ .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ BIT(IIO_CHAN_INFO_SCALE), \ .scan_index = idx, \ .scan_type = { \ .sign = 's', \ .realbits = 12, \ .storagebits = 16, \ .shift = 4, \ .endianness = IIO_BE, \ }, \ } static const struct iio_chan_spec mma8452_channels[] = { MMA8452_CHANNEL(X, 0), MMA8452_CHANNEL(Y, 1), MMA8452_CHANNEL(Z, 2), IIO_CHAN_SOFT_TIMESTAMP(3), }; static struct attribute *mma8452_attributes[] = { &iio_dev_attr_sampling_frequency_available.dev_attr.attr, &iio_dev_attr_in_accel_scale_available.dev_attr.attr, NULL }; static const struct attribute_group mma8452_group = { .attrs = mma8452_attributes, };
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ BIT(IIO_CHAN_INFO_SCALE), \ .scan_index = idx, \ .scan_type = { \ .sign = 's', \ .realbits = (bits), \ .storagebits = 16, \ .shift = 16 - (bits), \ .endianness = IIO_BE, \ }, \ .event_spec = mma8452_motion_event, \ .num_event_specs = ARRAY_SIZE(mma8452_motion_event), \ } static const struct iio_chan_spec mma8452_channels[] = { MMA8452_CHANNEL(X, idx_x, 12), MMA8452_CHANNEL(Y, idx_y, 12), MMA8452_CHANNEL(Z, idx_z, 12), IIO_CHAN_SOFT_TIMESTAMP(idx_ts), }; static const struct iio_chan_spec mma8453_channels[] = { MMA8452_CHANNEL(X, idx_x, 10), MMA8452_CHANNEL(Y, idx_y, 10), MMA8452_CHANNEL(Z, idx_z, 10), IIO_CHAN_SOFT_TIMESTAMP(idx_ts), }; static const struct iio_chan_spec mma8652_channels[] = { MMA8652_CHANNEL(X, idx_x, 12), MMA8652_CHANNEL(Y, idx_y, 12),