From: Jonathan Cameron Date: Tue, 21 Sep 2010 13:40:49 +0000 (+0100) Subject: staging: iio: adis16209 add _type attributes for all scan elements X-Git-Tag: upstream/snapshot3+hdmi~12602^2~3^2~529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a4429c85e5059f3efd763d088a8e4803f519de1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git staging: iio: adis16209 add _type attributes for all scan elements Signed-off-by: Jonathan Cameron Signed-off-by: Manuel Stahl Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/adis16209_ring.c b/drivers/staging/iio/accel/adis16209_ring.c index 3eb1d55..6837f8b 100644 --- a/drivers/staging/iio/accel/adis16209_ring.c +++ b/drivers/staging/iio/accel/adis16209_ring.c @@ -19,33 +19,46 @@ static IIO_SCAN_EL_C(in_supply, ADIS16209_SCAN_SUPPLY, IIO_UNSIGNED(14), ADIS16209_SUPPLY_OUT, NULL); +static IIO_CONST_ATTR_SCAN_EL_TYPE(in_supply, u, 14, 16) static IIO_SCAN_EL_C(accel_x, ADIS16209_SCAN_ACC_X, IIO_SIGNED(14), ADIS16209_XACCL_OUT, NULL); static IIO_SCAN_EL_C(accel_y, ADIS16209_SCAN_ACC_Y, IIO_SIGNED(14), ADIS16209_YACCL_OUT, NULL); +static IIO_CONST_ATTR_SCAN_EL_TYPE(accel, s, 14, 16); static IIO_SCAN_EL_C(in0, ADIS16209_SCAN_AUX_ADC, IIO_UNSIGNED(12), ADIS16209_AUX_ADC, NULL); +static IIO_CONST_ATTR_SCAN_EL_TYPE(in0, u, 12, 16); static IIO_SCAN_EL_C(temp, ADIS16209_SCAN_TEMP, IIO_UNSIGNED(12), ADIS16209_TEMP_OUT, NULL); +static IIO_CONST_ATTR_SCAN_EL_TYPE(temp, u, 12, 16); static IIO_SCAN_EL_C(incli_x, ADIS16209_SCAN_INCLI_X, IIO_SIGNED(14), ADIS16209_XINCL_OUT, NULL); static IIO_SCAN_EL_C(incli_y, ADIS16209_SCAN_INCLI_Y, IIO_SIGNED(14), ADIS16209_YINCL_OUT, NULL); +static IIO_CONST_ATTR_SCAN_EL_TYPE(incli, s, 14, 16); static IIO_SCAN_EL_C(rot, ADIS16209_SCAN_ROT, IIO_SIGNED(14), ADIS16209_ROT_OUT, NULL); - +static IIO_CONST_ATTR_SCAN_EL_TYPE(rot, s, 14, 16); static IIO_SCAN_EL_TIMESTAMP(8); +static IIO_CONST_ATTR_SCAN_EL_TYPE(timestamp, s, 64, 64); static struct attribute *adis16209_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_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_incli_x.dev_attr.attr, &iio_scan_el_incli_y.dev_attr.attr, + &iio_const_attr_incli_type.dev_attr.attr, &iio_scan_el_rot.dev_attr.attr, + &iio_const_attr_rot_type.dev_attr.attr, &iio_scan_el_timestamp.dev_attr.attr, + &iio_const_attr_timestamp_type.dev_attr.attr, NULL, };