staging: iio: adis16240 add _type attributes for all scan elements
authorJonathan Cameron <jic23@cam.ac.uk>
Tue, 21 Sep 2010 13:40:50 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Sep 2010 17:34:40 +0000 (10:34 -0700)
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/accel/adis16240_ring.c

index 9282372e7a692acc2f38d6bf7cf9a4290246a458..b858d3055815b673bb49c28d5138498b6c348d68 100644 (file)
 
 static IIO_SCAN_EL_C(in_supply, ADIS16240_SCAN_SUPPLY, IIO_UNSIGNED(10),
                ADIS16240_SUPPLY_OUT, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in_supply, u, 10, 16);
 static IIO_SCAN_EL_C(accel_x, ADIS16240_SCAN_ACC_X, IIO_SIGNED(10),
                ADIS16240_XACCL_OUT, NULL);
 static IIO_SCAN_EL_C(accel_y, ADIS16240_SCAN_ACC_Y, IIO_SIGNED(10),
                ADIS16240_YACCL_OUT, NULL);
 static IIO_SCAN_EL_C(accel_z, ADIS16240_SCAN_ACC_Z, IIO_SIGNED(10),
                ADIS16240_ZACCL_OUT, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(accel, s, 10, 16);
 static IIO_SCAN_EL_C(in0, ADIS16240_SCAN_AUX_ADC, IIO_UNSIGNED(10),
                ADIS16240_AUX_ADC, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(in0, u, 10, 16);
 static IIO_SCAN_EL_C(temp, ADIS16240_SCAN_TEMP, IIO_UNSIGNED(10),
                ADIS16240_TEMP_OUT, NULL);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(temp, u, 10, 16);
 
 static IIO_SCAN_EL_TIMESTAMP(6);
+static IIO_CONST_ATTR_SCAN_EL_TYPE(timestamp, s, 64, 64);
 
 static struct attribute *adis16240_scan_el_attrs[] = {
        &iio_scan_el_in_supply.dev_attr.attr,
+       &iio_const_attr_in_supply_type.dev_attr.attr,
        &iio_scan_el_accel_x.dev_attr.attr,
        &iio_scan_el_accel_y.dev_attr.attr,
        &iio_scan_el_accel_z.dev_attr.attr,
+       &iio_const_attr_accel_type.dev_attr.attr,
        &iio_scan_el_in0.dev_attr.attr,
+       &iio_const_attr_in0_type.dev_attr.attr,
        &iio_scan_el_temp.dev_attr.attr,
+       &iio_const_attr_temp_type.dev_attr.attr,
        &iio_scan_el_timestamp.dev_attr.attr,
+       &iio_const_attr_timestamp_type.dev_attr.attr,
        NULL,
 };