diff options
author | Manuel Stahl <manuel.stahl@iis.fraunhofer.de> | 2010-08-31 11:32:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 11:42:02 -0700 |
commit | 51a0a5b02132f880ff2d2bd7dbbe73b2dfd708a4 (patch) | |
tree | 15901982884689bfeca9f7bc5b74e38a4e0083a8 /drivers/staging/iio/gyro | |
parent | 5770b8ffaf960a48d78d6bea06006eb7335688dd (diff) |
staging: iio sync drivers with current ABI
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/gyro')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 20 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_ring.c | 12 | ||||
-rw-r--r-- | drivers/staging/iio/gyro/gyro.h | 46 |
3 files changed, 54 insertions, 24 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index 134dfaae2f0c..ac5378b4a3fd 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -445,22 +445,22 @@ err_ret: static IIO_DEV_ATTR_IN_NAMED_RAW(supply, adis16260_read_12bit_unsigned, ADIS16260_SUPPLY_OUT); -static IIO_CONST_ATTR(in_supply_scale, "0.0018315"); +static IIO_CONST_ATTR_IN_NAMED_SCALE(supply, "0.0018315"); static IIO_DEV_ATTR_GYRO(adis16260_read_14bit_signed, ADIS16260_GYRO_OUT); -static IIO_DEV_ATTR_GYRO_SCALE(S_IWUSR | S_IRUGO, +static IIO_DEV_ATTR_GYRO_CALIBSCALE(S_IWUSR | S_IRUGO, adis16260_read_14bit_signed, adis16260_write_16bit, ADIS16260_GYRO_SCALE); -static IIO_DEV_ATTR_GYRO_OFFSET(S_IWUSR | S_IRUGO, +static IIO_DEV_ATTR_GYRO_CALIBBIAS(S_IWUSR | S_IRUGO, adis16260_read_12bit_signed, adis16260_write_16bit, ADIS16260_GYRO_OFF); static IIO_DEV_ATTR_TEMP_RAW(adis16260_read_12bit_unsigned); -static IIO_CONST_ATTR(temp_offset, "25"); -static IIO_CONST_ATTR(temp_scale, "0.1453"); +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, ADIS16260_AUX_ADC); @@ -474,9 +474,9 @@ static IIO_DEV_ATTR_ANGL(adis16260_read_14bit_signed, static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16260_write_reset, 0); -static IIO_CONST_ATTR_AVAIL_SAMP_FREQ("256 2048"); +static IIO_CONST_ATTR_SAMP_FREQ_AVAIL("256 2048"); -static IIO_CONST_ATTR(name, "adis16260"); +static IIO_CONST_ATTR_NAME("adis16260"); static struct attribute *adis16260_event_attributes[] = { NULL @@ -490,8 +490,8 @@ 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_gyro_raw.dev_attr.attr, - &iio_dev_attr_gyro_scale.dev_attr.attr, - &iio_dev_attr_gyro_offset.dev_attr.attr, + &iio_dev_attr_gyro_calibscale.dev_attr.attr, + &iio_dev_attr_gyro_calibbias.dev_attr.attr, &iio_dev_attr_angl_raw.dev_attr.attr, &iio_dev_attr_temp_raw.dev_attr.attr, &iio_const_attr_temp_offset.dev_attr.attr, @@ -499,7 +499,7 @@ static struct attribute *adis16260_attributes[] = { &iio_dev_attr_in0_raw.dev_attr.attr, &iio_const_attr_in0_scale.dev_attr.attr, &iio_dev_attr_sampling_frequency.dev_attr.attr, - &iio_const_attr_available_sampling_frequency.dev_attr.attr, + &iio_const_attr_sampling_frequency_available.dev_attr.attr, &iio_dev_attr_reset.dev_attr.attr, &iio_const_attr_name.dev_attr.attr, NULL diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c index 03348605dd8c..659a672b1c5d 100644 --- a/drivers/staging/iio/gyro/adis16260_ring.c +++ b/drivers/staging/iio/gyro/adis16260_ring.c @@ -17,11 +17,11 @@ #include "../trigger.h" #include "adis16260.h" -static IIO_SCAN_EL_C(supply, ADIS16260_SCAN_SUPPLY, IIO_UNSIGNED(12), +static IIO_SCAN_EL_C(in_supply, ADIS16260_SCAN_SUPPLY, IIO_UNSIGNED(12), ADIS16260_SUPPLY_OUT, NULL); static IIO_SCAN_EL_C(gyro, ADIS16260_SCAN_GYRO, IIO_SIGNED(14), ADIS16260_GYRO_OUT, NULL); -static IIO_SCAN_EL_C(aux_adc, ADIS16260_SCAN_AUX_ADC, IIO_SIGNED(14), +static IIO_SCAN_EL_C(in0, ADIS16260_SCAN_AUX_ADC, IIO_SIGNED(14), ADIS16260_AUX_ADC, NULL); static IIO_SCAN_EL_C(temp, ADIS16260_SCAN_TEMP, IIO_UNSIGNED(12), ADIS16260_TEMP_OUT, NULL); @@ -31,9 +31,9 @@ static IIO_SCAN_EL_C(angl, ADIS16260_SCAN_ANGL, IIO_UNSIGNED(12), static IIO_SCAN_EL_TIMESTAMP(5); static struct attribute *adis16260_scan_el_attrs[] = { - &iio_scan_el_supply.dev_attr.attr, + &iio_scan_el_in_supply.dev_attr.attr, &iio_scan_el_gyro.dev_attr.attr, - &iio_scan_el_aux_adc.dev_attr.attr, + &iio_scan_el_in0.dev_attr.attr, &iio_scan_el_temp.dev_attr.attr, &iio_scan_el_angl.dev_attr.attr, &iio_scan_el_timestamp.dev_attr.attr, @@ -172,9 +172,9 @@ int adis16260_configure_ring(struct iio_dev *indio_dev) ring->owner = THIS_MODULE; /* Set default scan mode */ - iio_scan_mask_set(ring, iio_scan_el_supply.number); + iio_scan_mask_set(ring, iio_scan_el_in_supply.number); iio_scan_mask_set(ring, iio_scan_el_gyro.number); - iio_scan_mask_set(ring, iio_scan_el_aux_adc.number); + iio_scan_mask_set(ring, iio_scan_el_in0.number); iio_scan_mask_set(ring, iio_scan_el_temp.number); iio_scan_mask_set(ring, iio_scan_el_angl.number); diff --git a/drivers/staging/iio/gyro/gyro.h b/drivers/staging/iio/gyro/gyro.h index f68edab8f30d..98b837b775a2 100644 --- a/drivers/staging/iio/gyro/gyro.h +++ b/drivers/staging/iio/gyro/gyro.h @@ -3,6 +3,9 @@ /* Gyroscope types of attribute */ +#define IIO_CONST_ATTR_GYRO_OFFSET(_string) \ + IIO_CONST_ATTR(gyro_offset, _string) + #define IIO_DEV_ATTR_GYRO_OFFSET(_mode, _show, _store, _addr) \ IIO_DEVICE_ATTR(gyro_offset, _mode, _show, _store, _addr) @@ -15,18 +18,45 @@ #define IIO_DEV_ATTR_GYRO_Z_OFFSET(_mode, _show, _store, _addr) \ IIO_DEVICE_ATTR(gyro_z_offset, _mode, _show, _store, _addr) -#define IIO_DEV_ATTR_GYRO_X_GAIN(_mode, _show, _store, _addr) \ - IIO_DEVICE_ATTR(gyro_x_gain, _mode, _show, _store, _addr) - -#define IIO_DEV_ATTR_GYRO_Y_GAIN(_mode, _show, _store, _addr) \ - IIO_DEVICE_ATTR(gyro_y_gain, _mode, _show, _store, _addr) - -#define IIO_DEV_ATTR_GYRO_Z_GAIN(_mode, _show, _store, _addr) \ - IIO_DEVICE_ATTR(gyro_z_gain, _mode, _show, _store, _addr) +#define IIO_CONST_ATTR_GYRO_SCALE(_string) \ + IIO_CONST_ATTR(gyro_scale, _string) #define IIO_DEV_ATTR_GYRO_SCALE(_mode, _show, _store, _addr) \ IIO_DEVICE_ATTR(gyro_scale, S_IRUGO, _show, _store, _addr) +#define IIO_DEV_ATTR_GYRO_X_SCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_x_scale, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Y_SCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_y_scale, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Z_SCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_z_scale, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_CALIBBIAS(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_calibbias, S_IRUGO, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_X_CALIBBIAS(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_x_calibbias, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Y_CALIBBIAS(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_y_calibbias, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Z_CALIBBIAS(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_z_calibbias, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_CALIBSCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_calibscale, S_IRUGO, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_X_CALIBSCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_x_calibscale, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Y_CALIBSCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_y_calibscale, _mode, _show, _store, _addr) + +#define IIO_DEV_ATTR_GYRO_Z_CALIBSCALE(_mode, _show, _store, _addr) \ + IIO_DEVICE_ATTR(gyro_z_calibscale, _mode, _show, _store, _addr) + #define IIO_DEV_ATTR_GYRO(_show, _addr) \ IIO_DEVICE_ATTR(gyro_raw, S_IRUGO, _show, NULL, _addr) |