aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/gyro
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2020-02-10 15:26:02 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-03-08 17:28:30 +0000
commitfdcf6bbb4ed388844e74810e117ac87db1347f3a (patch)
treed325639461e72f88afbf4d853c6320b3be00757c /drivers/iio/gyro
parentiio: imu: adis: add unlocked __adis_initial_startup() (diff)
downloadwireguard-linux-fdcf6bbb4ed388844e74810e117ac87db1347f3a.tar.xz
wireguard-linux-fdcf6bbb4ed388844e74810e117ac87db1347f3a.zip
iio: imu: adis: Add self_test_reg variable
This patch adds a dedicated self_test_reg variable. This is also a step to let new drivers make use of `adis_initial_startup()`. Some devices use MSG_CTRL reg to request a self_test command while others use the GLOB_CMD register. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r--drivers/iio/gyro/adis16136.c1
-rw-r--r--drivers/iio/gyro/adis16260.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
index 1db1131e5c67..a4c967a5fc5c 100644
--- a/drivers/iio/gyro/adis16136.c
+++ b/drivers/iio/gyro/adis16136.c
@@ -471,6 +471,7 @@ static const char * const adis16136_status_error_msgs[] = {
.diag_stat_reg = ADIS16136_REG_DIAG_STAT, \
.glob_cmd_reg = ADIS16136_REG_GLOB_CMD, \
.msc_ctrl_reg = ADIS16136_REG_MSC_CTRL, \
+ .self_test_reg = ADIS16136_REG_MSC_CTRL, \
.self_test_mask = ADIS16136_MSC_CTRL_SELF_TEST, \
.read_delay = 10, \
.write_delay = 10, \
diff --git a/drivers/iio/gyro/adis16260.c b/drivers/iio/gyro/adis16260.c
index be09b3e5910c..9823573e811a 100644
--- a/drivers/iio/gyro/adis16260.c
+++ b/drivers/iio/gyro/adis16260.c
@@ -346,6 +346,7 @@ static const struct adis_data adis16260_data = {
.diag_stat_reg = ADIS16260_DIAG_STAT,
.self_test_mask = ADIS16260_MSC_CTRL_MEM_TEST,
+ .self_test_reg = ADIS16260_MSC_CTRL,
.timeouts = &adis16260_timeouts,
.status_error_msgs = adis1620_status_error_msgs,