return ret;
}
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16209_read_14bit_unsigned,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16209_read_14bit_unsigned,
ADIS16209_SUPPLY_OUT);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.30518");
-static IIO_DEV_ATTR_IN_RAW(0, adis16209_read_12bit_unsigned,
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.30518");
+static IIO_DEV_ATTR_IN_RAW(1, adis16209_read_12bit_unsigned,
ADIS16209_AUX_ADC);
-static IIO_CONST_ATTR(in0_scale, "0.6105");
+static IIO_CONST_ATTR(in1_scale, "0.6105");
static IIO_DEV_ATTR_ACCEL_X(adis16209_read_14bit_signed,
ADIS16209_XACCL_OUT);
};
static struct attribute *adis16209_attributes[] = {
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_temp_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
&iio_const_attr_name.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
- &iio_const_attr_in0_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_const_attr_in1_scale.dev_attr.attr,
&iio_dev_attr_accel_x_raw.dev_attr.attr,
&iio_dev_attr_accel_y_raw.dev_attr.attr,
&iio_dev_attr_accel_x_calibbias.dev_attr.attr,
.size = ADIS16220_CAPTURE_SIZE,
};
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16220_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16220_read_12bit_unsigned,
ADIS16220_CAPT_SUPPLY);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.0012207");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.0012207");
static IIO_DEV_ATTR_ACCEL(adis16220_read_16bit, ADIS16220_CAPT_BUFA);
static IIO_DEVICE_ATTR(accel_peak_raw, S_IRUGO, adis16220_read_16bit,
NULL, ADIS16220_CAPT_PEAKA);
static IIO_CONST_ATTR_TEMP_OFFSET("25");
static IIO_CONST_ATTR_TEMP_SCALE("-0.47");
-static IIO_DEV_ATTR_IN_RAW(0, adis16220_read_16bit, ADIS16220_CAPT_BUF1);
-static IIO_DEV_ATTR_IN_RAW(1, adis16220_read_16bit, ADIS16220_CAPT_BUF2);
+static IIO_DEV_ATTR_IN_RAW(1, adis16220_read_16bit, ADIS16220_CAPT_BUF1);
+static IIO_DEV_ATTR_IN_RAW(2, adis16220_read_16bit, ADIS16220_CAPT_BUF2);
static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL,
adis16220_write_reset, 0);
static IIO_CONST_ATTR_NAME("adis16220");
static struct attribute *adis16220_attributes[] = {
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_accel_raw.dev_attr.attr,
&iio_dev_attr_accel_offset.dev_attr.attr,
&iio_dev_attr_accel_peak_raw.dev_attr.attr,
&iio_const_attr_accel_scale.dev_attr.attr,
&iio_dev_attr_temp_raw.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
&iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_dev_attr_in2_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
return ret;
}
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16240_read_10bit_unsigned,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16240_read_10bit_unsigned,
ADIS16240_SUPPLY_OUT);
-static IIO_DEV_ATTR_IN_RAW(0, adis16240_read_10bit_signed,
+static IIO_DEV_ATTR_IN_RAW(1, adis16240_read_10bit_signed,
ADIS16240_AUX_ADC);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.00488");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.00488");
static IIO_CONST_ATTR_ACCEL_SCALE("0.50406181");
static IIO_CONST_ATTR(accel_peak_scale, "6.6292954");
};
static struct attribute *adis16240_attributes[] = {
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
&iio_const_attr_accel_scale.dev_attr.attr,
&iio_const_attr_accel_peak_scale.dev_attr.attr,
&iio_dev_attr_accel_x_raw.dev_attr.attr,
#define IIO_DEV_ATTR_IN_RAW(_num, _show, _addr) \
IIO_DEVICE_ATTR(in##_num##_raw, S_IRUGO, _show, NULL, _addr)
-#define IIO_DEV_ATTR_IN_NAMED_RAW(_name, _show, _addr) \
- IIO_DEVICE_ATTR(in_##_name##_raw, S_IRUGO, _show, NULL, _addr)
+#define IIO_DEV_ATTR_IN_NAMED_RAW(_num, _name, _show, _addr) \
+ IIO_DEVICE_ATTR(in##_num##_##_name##_raw, S_IRUGO, _show, NULL, _addr)
#define IIO_DEV_ATTR_IN_DIFF_RAW(_nump, _numn, _show, _addr) \
IIO_DEVICE_ATTR_NAMED(in##_nump##min##_numn##_raw, \
_addr)
-#define IIO_CONST_ATTR_IN_NAMED_OFFSET(_name, _string) \
- IIO_CONST_ATTR(in_##_name##_offset, _string)
+#define IIO_CONST_ATTR_IN_NAMED_OFFSET(_num, _name, _string) \
+ IIO_CONST_ATTR(in##_num##_##_name##_offset, _string)
-#define IIO_CONST_ATTR_IN_NAMED_SCALE(_name, _string) \
- IIO_CONST_ATTR(in_##_name##_scale, _string)
+#define IIO_CONST_ATTR_IN_NAMED_SCALE(_num, _name, _string) \
+ IIO_CONST_ATTR(in##_num##_##_name##_scale, _string)
#define IIO_EVENT_CODE_IN_HIGH_THRESH(a) \
IIO_UNMOD_EVENT_CODE(IIO_EV_CLASS_IN, a, IIO_EV_TYPE_THRESH, \
return ret;
}
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply,
adis16260_read_12bit_unsigned,
ADIS16260_SUPPLY_OUT);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.0018315");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.0018315");
static IIO_DEV_ATTR_GYRO(adis16260_read_14bit_signed,
ADIS16260_GYRO_OUT);
static IIO_CONST_ATTR_TEMP_OFFSET("25");
static IIO_CONST_ATTR_TEMP_SCALE("0.1453");
-static IIO_DEV_ATTR_IN_RAW(0, adis16260_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_RAW(1, adis16260_read_12bit_unsigned,
ADIS16260_AUX_ADC);
-static IIO_CONST_ATTR(in0_scale, "0.0006105");
+static IIO_CONST_ATTR(in1_scale, "0.0006105");
static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
adis16260_read_frequency,
};
static struct attribute *adis16260_attributes[] = {
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_gyro_raw.dev_attr.attr,
&iio_const_attr_gyro_scale.dev_attr.attr,
&iio_dev_attr_gyro_calibscale.dev_attr.attr,
&iio_dev_attr_temp_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
- &iio_const_attr_in0_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_const_attr_in1_scale.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
adis16300_write_16bit,
ADIS16300_ZACCL_OFF);
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16300_read_14bit_unsigned,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16300_read_14bit_unsigned,
ADIS16300_SUPPLY_OUT);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.00242");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.00242");
static IIO_DEV_ATTR_GYRO_X(adis16300_read_14bit_signed,
ADIS16300_XGYRO_OUT);
static IIO_CONST_ATTR_TEMP_OFFSET("198.16");
static IIO_CONST_ATTR_TEMP_SCALE("0.14");
-static IIO_DEV_ATTR_IN_RAW(0, adis16300_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_RAW(1, adis16300_read_12bit_unsigned,
ADIS16300_AUX_ADC);
-static IIO_CONST_ATTR(in0_scale, "0.000806");
+static IIO_CONST_ATTR(in1_scale, "0.000806");
static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
adis16300_read_frequency,
&iio_dev_attr_accel_x_calibbias.dev_attr.attr,
&iio_dev_attr_accel_y_calibbias.dev_attr.attr,
&iio_dev_attr_accel_z_calibbias.dev_attr.attr,
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_gyro_x_raw.dev_attr.attr,
&iio_const_attr_gyro_scale.dev_attr.attr,
&iio_dev_attr_accel_x_raw.dev_attr.attr,
&iio_dev_attr_temp_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
- &iio_const_attr_in0_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_const_attr_in1_scale.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
#include "../trigger.h"
#include "adis16300.h"
-static IIO_SCAN_EL_C(in_supply, ADIS16300_SCAN_SUPPLY,
+static IIO_SCAN_EL_C(in0_supply, ADIS16300_SCAN_SUPPLY,
ADIS16300_SUPPLY_OUT, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in_supply, u, 12, 16);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in0_supply, u, 12, 16);
static IIO_SCAN_EL_C(gyro_x, ADIS16300_SCAN_GYRO_X, ADIS16300_XGYRO_OUT, NULL);
static IIO_CONST_ATTR_SCAN_EL_TYPE(gyro, s, 14, 16);
static IIO_SCAN_EL_C(temp, ADIS16300_SCAN_TEMP, ADIS16300_TEMP_OUT, NULL);
static IIO_CONST_ATTR_SCAN_EL_TYPE(temp, s, 12, 16);
-static IIO_SCAN_EL_C(in0, ADIS16300_SCAN_ADC_0, ADIS16300_AUX_ADC, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in0, u, 12, 16);
+static IIO_SCAN_EL_C(in1, ADIS16300_SCAN_ADC_0, ADIS16300_AUX_ADC, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in1, u, 12, 16);
static IIO_SCAN_EL_C(incli_x, ADIS16300_SCAN_INCLI_X,
ADIS16300_XINCLI_OUT, NULL);
static IIO_CONST_ATTR_SCAN_EL_TYPE(timestamp, s, 64, 64);
static struct attribute *adis16300_scan_el_attrs[] = {
- &iio_scan_el_in_supply.dev_attr.attr,
- &iio_const_attr_in_supply_index.dev_attr.attr,
- &iio_const_attr_in_supply_type.dev_attr.attr,
+ &iio_scan_el_in0_supply.dev_attr.attr,
+ &iio_const_attr_in0_supply_index.dev_attr.attr,
+ &iio_const_attr_in0_supply_type.dev_attr.attr,
&iio_scan_el_gyro_x.dev_attr.attr,
&iio_const_attr_gyro_x_index.dev_attr.attr,
&iio_const_attr_gyro_type.dev_attr.attr,
&iio_scan_el_incli_y.dev_attr.attr,
&iio_const_attr_incli_y_index.dev_attr.attr,
&iio_const_attr_incli_type.dev_attr.attr,
- &iio_scan_el_in0.dev_attr.attr,
- &iio_const_attr_in0_index.dev_attr.attr,
- &iio_const_attr_in0_type.dev_attr.attr,
+ &iio_scan_el_in1.dev_attr.attr,
+ &iio_const_attr_in1_index.dev_attr.attr,
+ &iio_const_attr_in1_type.dev_attr.attr,
&iio_scan_el_timestamp.dev_attr.attr,
&iio_const_attr_timestamp_index.dev_attr.attr,
&iio_const_attr_timestamp_type.dev_attr.attr,
ring->owner = THIS_MODULE;
/* Set default scan mode */
- iio_scan_mask_set(ring, iio_scan_el_in_supply.number);
+ iio_scan_mask_set(ring, iio_scan_el_in0_supply.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_x.number);
iio_scan_mask_set(ring, iio_scan_el_accel_x.number);
iio_scan_mask_set(ring, iio_scan_el_accel_y.number);
iio_scan_mask_set(ring, iio_scan_el_accel_z.number);
iio_scan_mask_set(ring, iio_scan_el_temp.number);
- iio_scan_mask_set(ring, iio_scan_el_in0.number);
+ iio_scan_mask_set(ring, iio_scan_el_in1.number);
iio_scan_mask_set(ring, iio_scan_el_incli_x.number);
iio_scan_mask_set(ring, iio_scan_el_incli_y.number);
adis16350_write_16bit,
ADIS16350_ZACCL_OFF);
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16350_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16350_read_12bit_unsigned,
ADIS16350_SUPPLY_OUT);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.002418");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.002418");
static IIO_DEV_ATTR_GYRO_X(adis16350_read_14bit_signed,
ADIS16350_XGYRO_OUT);
static IIO_CONST_ATTR_TEMP_SCALE("0.14534");
static IIO_CONST_ATTR_TEMP_OFFSET("198.16");
-static IIO_DEV_ATTR_IN_RAW(0, adis16350_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_RAW(1, adis16350_read_12bit_unsigned,
ADIS16350_AUX_ADC);
-static IIO_CONST_ATTR(in0_scale, "0.000806");
+static IIO_CONST_ATTR(in1_scale, "0.000806");
static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
adis16350_read_frequency,
&iio_dev_attr_accel_x_calibbias.dev_attr.attr,
&iio_dev_attr_accel_y_calibbias.dev_attr.attr,
&iio_dev_attr_accel_z_calibbias.dev_attr.attr,
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_gyro_x_raw.dev_attr.attr,
&iio_dev_attr_gyro_y_raw.dev_attr.attr,
&iio_dev_attr_gyro_z_raw.dev_attr.attr,
&iio_dev_attr_temp_y_raw.dev_attr.attr,
&iio_dev_attr_temp_z_raw.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
- &iio_const_attr_in0_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_const_attr_in1_scale.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
#include "../trigger.h"
#include "adis16350.h"
-static IIO_SCAN_EL_C(in_supply, ADIS16350_SCAN_SUPPLY,
+static IIO_SCAN_EL_C(in0_supply, ADIS16350_SCAN_SUPPLY,
ADIS16350_SUPPLY_OUT, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in_supply, u, 12, 16);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in0_supply, u, 12, 16);
static IIO_SCAN_EL_C(gyro_x, ADIS16350_SCAN_GYRO_X, ADIS16350_XGYRO_OUT, NULL);
static IIO_SCAN_EL_C(gyro_y, ADIS16350_SCAN_GYRO_Y, ADIS16350_YGYRO_OUT, NULL);
static IIO_SCAN_EL_C(temp_z, ADIS16350_SCAN_TEMP_Z, ADIS16350_ZTEMP_OUT, NULL);
static IIO_CONST_ATTR_SCAN_EL_TYPE(temp, s, 12, 16);
-static IIO_SCAN_EL_C(in0, ADIS16350_SCAN_ADC_0, ADIS16350_AUX_ADC, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in0, u, 12, 16);
+static IIO_SCAN_EL_C(in1, ADIS16350_SCAN_ADC_0, ADIS16350_AUX_ADC, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in1, u, 12, 16);
static IIO_SCAN_EL_TIMESTAMP(11);
static IIO_CONST_ATTR_SCAN_EL_TYPE(timestamp, s, 64, 64);
static struct attribute *adis16350_scan_el_attrs[] = {
- &iio_scan_el_in_supply.dev_attr.attr,
- &iio_const_attr_in_supply_index.dev_attr.attr,
- &iio_const_attr_in_supply_type.dev_attr.attr,
+ &iio_scan_el_in0_supply.dev_attr.attr,
+ &iio_const_attr_in0_supply_index.dev_attr.attr,
+ &iio_const_attr_in0_supply_type.dev_attr.attr,
&iio_scan_el_gyro_x.dev_attr.attr,
&iio_const_attr_gyro_x_index.dev_attr.attr,
&iio_scan_el_gyro_y.dev_attr.attr,
&iio_scan_el_temp_z.dev_attr.attr,
&iio_const_attr_temp_z_index.dev_attr.attr,
&iio_const_attr_temp_type.dev_attr.attr,
- &iio_scan_el_in0.dev_attr.attr,
- &iio_const_attr_in0_index.dev_attr.attr,
- &iio_const_attr_in0_type.dev_attr.attr,
+ &iio_scan_el_in1.dev_attr.attr,
+ &iio_const_attr_in1_index.dev_attr.attr,
+ &iio_const_attr_in1_type.dev_attr.attr,
&iio_scan_el_timestamp.dev_attr.attr,
&iio_const_attr_timestamp_index.dev_attr.attr,
&iio_const_attr_timestamp_type.dev_attr.attr,
ring->owner = THIS_MODULE;
/* Set default scan mode */
- iio_scan_mask_set(ring, iio_scan_el_in_supply.number);
+ iio_scan_mask_set(ring, iio_scan_el_in0_supply.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_x.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_y.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_z.number);
iio_scan_mask_set(ring, iio_scan_el_temp_x.number);
iio_scan_mask_set(ring, iio_scan_el_temp_y.number);
iio_scan_mask_set(ring, iio_scan_el_temp_z.number);
- iio_scan_mask_set(ring, iio_scan_el_in0.number);
+ iio_scan_mask_set(ring, iio_scan_el_in1.number);
ret = iio_alloc_pollfunc(indio_dev, NULL, &adis16350_poll_func_th);
if (ret)
static ADIS16400_DEV_ATTR_CALIBBIAS(ACCEL_Z, ADIS16400_XACCL_OFF);
-static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16400_read_14bit_signed,
+static IIO_DEV_ATTR_IN_NAMED_RAW(0, supply, adis16400_read_14bit_signed,
ADIS16400_SUPPLY_OUT);
-static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.002418 V");
+static IIO_CONST_ATTR_IN_NAMED_SCALE(0, supply, "0.002418 V");
static IIO_DEV_ATTR_GYRO_X(adis16400_read_14bit_signed,
ADIS16400_XGYRO_OUT);
static IIO_CONST_ATTR_TEMP_OFFSET("198.16 K");
static IIO_CONST_ATTR_TEMP_SCALE("0.14 K");
-static IIO_DEV_ATTR_IN_RAW(0, adis16400_read_12bit_unsigned,
+static IIO_DEV_ATTR_IN_RAW(1, adis16400_read_12bit_unsigned,
ADIS16400_AUX_ADC);
-static IIO_CONST_ATTR(in0_scale, "0.000806 V");
+static IIO_CONST_ATTR(in1_scale, "0.000806 V");
static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
adis16400_read_frequency,
&iio_dev_attr_accel_x_calibbias.dev_attr.attr,
&iio_dev_attr_accel_y_calibbias.dev_attr.attr,
&iio_dev_attr_accel_z_calibbias.dev_attr.attr,
- &iio_dev_attr_in_supply_raw.dev_attr.attr,
- &iio_const_attr_in_supply_scale.dev_attr.attr,
+ &iio_dev_attr_in0_supply_raw.dev_attr.attr,
+ &iio_const_attr_in0_supply_scale.dev_attr.attr,
&iio_dev_attr_gyro_x_raw.dev_attr.attr,
&iio_dev_attr_gyro_y_raw.dev_attr.attr,
&iio_dev_attr_gyro_z_raw.dev_attr.attr,
&iio_dev_attr_temp_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
- &iio_dev_attr_in0_raw.dev_attr.attr,
- &iio_const_attr_in0_scale.dev_attr.attr,
+ &iio_dev_attr_in1_raw.dev_attr.attr,
+ &iio_const_attr_in1_scale.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
#include "../trigger.h"
#include "adis16400.h"
-static IIO_SCAN_EL_C(in_supply, ADIS16400_SCAN_SUPPLY,
+static IIO_SCAN_EL_C(in0_supply, ADIS16400_SCAN_SUPPLY,
ADIS16400_SUPPLY_OUT, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in_supply, u, 14, 16);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in0_supply, u, 14, 16);
static IIO_SCAN_EL_C(gyro_x, ADIS16400_SCAN_GYRO_X, ADIS16400_XGYRO_OUT, NULL);
static IIO_SCAN_EL_C(gyro_y, ADIS16400_SCAN_GYRO_Y, ADIS16400_YGYRO_OUT, NULL);
static IIO_SCAN_EL_C(temp, ADIS16400_SCAN_TEMP, ADIS16400_TEMP_OUT, NULL);
static IIO_CONST_ATTR_SCAN_EL_TYPE(temp, s, 12, 16);
-static IIO_SCAN_EL_C(in0, ADIS16400_SCAN_ADC_0, ADIS16400_AUX_ADC, NULL);
-static IIO_CONST_ATTR_SCAN_EL_TYPE(in0, u, 12, 16);
+static IIO_SCAN_EL_C(in1, ADIS16400_SCAN_ADC_0, ADIS16400_AUX_ADC, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in1, u, 12, 16);
static IIO_SCAN_EL_TIMESTAMP(12);
static IIO_CONST_ATTR_SCAN_EL_TYPE(timestamp, s, 64, 64);
static struct attribute *adis16400_scan_el_attrs[] = {
- &iio_scan_el_in_supply.dev_attr.attr,
- &iio_const_attr_in_supply_index.dev_attr.attr,
- &iio_const_attr_in_supply_type.dev_attr.attr,
+ &iio_scan_el_in0_supply.dev_attr.attr,
+ &iio_const_attr_in0_supply_index.dev_attr.attr,
+ &iio_const_attr_in0_supply_type.dev_attr.attr,
&iio_scan_el_gyro_x.dev_attr.attr,
&iio_const_attr_gyro_x_index.dev_attr.attr,
&iio_scan_el_gyro_y.dev_attr.attr,
&iio_scan_el_temp.dev_attr.attr,
&iio_const_attr_temp_index.dev_attr.attr,
&iio_const_attr_temp_type.dev_attr.attr,
- &iio_scan_el_in0.dev_attr.attr,
- &iio_const_attr_in0_index.dev_attr.attr,
- &iio_const_attr_in0_type.dev_attr.attr,
+ &iio_scan_el_in1.dev_attr.attr,
+ &iio_const_attr_in1_index.dev_attr.attr,
+ &iio_const_attr_in1_type.dev_attr.attr,
&iio_scan_el_timestamp.dev_attr.attr,
&iio_const_attr_timestamp_index.dev_attr.attr,
&iio_const_attr_timestamp_type.dev_attr.attr,
ring->owner = THIS_MODULE;
/* Set default scan mode */
- iio_scan_mask_set(ring, iio_scan_el_in_supply.number);
+ iio_scan_mask_set(ring, iio_scan_el_in0_supply.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_x.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_y.number);
iio_scan_mask_set(ring, iio_scan_el_gyro_z.number);
iio_scan_mask_set(ring, iio_scan_el_magn_y.number);
iio_scan_mask_set(ring, iio_scan_el_magn_z.number);
iio_scan_mask_set(ring, iio_scan_el_temp.number);
- iio_scan_mask_set(ring, iio_scan_el_in0.number);
+ iio_scan_mask_set(ring, iio_scan_el_in1.number);
ret = iio_alloc_pollfunc(indio_dev, NULL, &adis16400_poll_func_th);
if (ret)