summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorDenis CIOCCA <denis.ciocca@st.com>2013-06-03 18:58:00 +0400
committerJonathan Cameron <jic23@kernel.org>2013-06-04 21:53:56 +0400
commit762011d6193f8b9af9b491ded87dde3221d0600a (patch)
treedcb4407f84566ab08c12ee739ab77954a4af8057 /include/linux/iio
parent0a4510a6cbee270820871e60ab0cac7058b2f394 (diff)
downloadlinux-762011d6193f8b9af9b491ded87dde3221d0600a.tar.xz
iio:common: ST_SENSORS_LSM_CHANNELS macro changed
Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/common/st_sensors.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 172c5b23cb84..5ffd763702dc 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, \
}, \
}