Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adis16400: Add ADIS16445 support

The ADIS16445 is similar to the ADIS16448, but without the magnetometer and
pressure channels as well as different scale factors for the gyroscope and
accelerometer outputs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
72d9c986 dc8615ce

+26
+26
drivers/iio/imu/adis16400_core.c
··· 141 141 ADIS16364, 142 142 ADIS16367, 143 143 ADIS16400, 144 + ADIS16445, 144 145 ADIS16448, 145 146 }; 146 147 ··· 624 623 IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), 625 624 }; 626 625 626 + static const struct iio_chan_spec adis16445_channels[] = { 627 + ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16), 628 + ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16), 629 + ADIS16400_GYRO_CHAN(Z, ADIS16400_ZGYRO_OUT, 16), 630 + ADIS16400_ACCEL_CHAN(X, ADIS16400_XACCL_OUT, 16), 631 + ADIS16400_ACCEL_CHAN(Y, ADIS16400_YACCL_OUT, 16), 632 + ADIS16400_ACCEL_CHAN(Z, ADIS16400_ZACCL_OUT, 16), 633 + ADIS16400_TEMP_CHAN(ADIS16448_TEMP_OUT, 12), 634 + IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP), 635 + }; 636 + 627 637 static const struct iio_chan_spec adis16448_channels[] = { 628 638 ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16), 629 639 ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16), ··· 800 788 .set_freq = adis16400_set_freq, 801 789 .get_freq = adis16400_get_freq, 802 790 }, 791 + [ADIS16445] = { 792 + .channels = adis16445_channels, 793 + .num_channels = ARRAY_SIZE(adis16445_channels), 794 + .flags = ADIS16400_HAS_PROD_ID | 795 + ADIS16400_HAS_SERIAL_NUMBER | 796 + ADIS16400_BURST_DIAG_STAT, 797 + .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */ 798 + .accel_scale_micro = IIO_G_TO_M_S_2(250), /* 1/4000 g */ 799 + .temp_scale_nano = 73860000, /* 0.07386 C */ 800 + .temp_offset = 31000000 / 73860, /* 31 C = 0x00 */ 801 + .set_freq = adis16334_set_freq, 802 + .get_freq = adis16334_get_freq, 803 + }, 803 804 [ADIS16448] = { 804 805 .channels = adis16448_channels, 805 806 .num_channels = ARRAY_SIZE(adis16448_channels), ··· 977 952 {"adis16367", ADIS16367}, 978 953 {"adis16400", ADIS16400}, 979 954 {"adis16405", ADIS16400}, 955 + {"adis16445", ADIS16445}, 980 956 {"adis16448", ADIS16448}, 981 957 {} 982 958 };