From 762011d6193f8b9af9b491ded87dde3221d0600a Mon Sep 17 00:00:00 2001 From: Denis CIOCCA Date: Mon, 3 Jun 2013 15:58:00 +0100 Subject: iio:common: ST_SENSORS_LSM_CHANNELS macro changed Signed-off-by: Denis Ciocca Signed-off-by: Jonathan Cameron --- include/linux/iio/common/st_sensors.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'include/linux/iio') diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 172c5b23cb8..5ffd763702d 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h @@ -30,8 +30,6 @@ #define ST_SENSORS_SCAN_X 0 #define ST_SENSORS_SCAN_Y 1 #define ST_SENSORS_SCAN_Z 2 -#define ST_SENSORS_DEFAULT_12_REALBITS 12 -#define ST_SENSORS_DEFAULT_16_REALBITS 16 #define ST_SENSORS_DEFAULT_POWER_ON_VALUE 0x01 #define ST_SENSORS_DEFAULT_POWER_OFF_VALUE 0x00 #define ST_SENSORS_DEFAULT_WAI_ADDRESS 0x0f @@ -42,20 +40,20 @@ #define ST_SENSORS_MAX_NAME 17 #define ST_SENSORS_MAX_4WAI 7 -#define ST_SENSORS_LSM_CHANNELS(device_type, index, mod, endian, bits, addr) \ +#define ST_SENSORS_LSM_CHANNELS(device_type, mask, index, mod, \ + ch2, s, endian, rbits, sbits, addr) \ { \ .type = device_type, \ - .modified = 1, \ - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ - BIT(IIO_CHAN_INFO_SCALE), \ + .modified = mod, \ + .info_mask_separate = mask, \ .scan_index = index, \ - .channel2 = mod, \ + .channel2 = ch2, \ .address = addr, \ .scan_type = { \ - .sign = 's', \ - .realbits = bits, \ - .shift = 16 - bits, \ - .storagebits = 16, \ + .sign = s, \ + .realbits = rbits, \ + .shift = sbits - rbits, \ + .storagebits = sbits, \ .endianness = endian, \ }, \ } -- cgit v1.2.3-70-g09d2