iio: accel: sca3300: add define for temp channel for reuse.
Add define of SCA3300_TEMP_CHANNEL for reuse. Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-3-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
2231b463e4
commit
e59dd3aca9
@ -72,22 +72,24 @@ enum sca3300_scan_indexes {
|
||||
}, \
|
||||
}
|
||||
|
||||
#define SCA3300_TEMP_CHANNEL(index, reg) { \
|
||||
.type = IIO_TEMP, \
|
||||
.address = reg, \
|
||||
.scan_index = index, \
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
|
||||
.scan_type = { \
|
||||
.sign = 's', \
|
||||
.realbits = 16, \
|
||||
.storagebits = 16, \
|
||||
.endianness = IIO_CPU, \
|
||||
}, \
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec sca3300_channels[] = {
|
||||
SCA3300_ACCEL_CHANNEL(SCA3300_ACC_X, 0x1, X),
|
||||
SCA3300_ACCEL_CHANNEL(SCA3300_ACC_Y, 0x2, Y),
|
||||
SCA3300_ACCEL_CHANNEL(SCA3300_ACC_Z, 0x3, Z),
|
||||
{
|
||||
.type = IIO_TEMP,
|
||||
.address = 0x5,
|
||||
.scan_index = SCA3300_TEMP,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
.scan_type = {
|
||||
.sign = 's',
|
||||
.realbits = 16,
|
||||
.storagebits = 16,
|
||||
.endianness = IIO_CPU,
|
||||
},
|
||||
},
|
||||
SCA3300_TEMP_CHANNEL(SCA3300_TEMP, 0x05),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(4),
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user