From fdcf6bbb4ed388844e74810e117ac87db1347f3a Mon Sep 17 00:00:00 2001 From: Nuno Sá Date: Mon, 10 Feb 2020 15:26:02 +0200 Subject: iio: imu: adis: Add self_test_reg variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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á Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- drivers/iio/imu/adis16480.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/iio/imu/adis16480.c') diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c index 4c4de1b62769..acbe1701fc2d 100644 --- a/drivers/iio/imu/adis16480.c +++ b/drivers/iio/imu/adis16480.c @@ -830,6 +830,7 @@ static int adis16480_enable_irq(struct adis *adis, bool enable); .read_delay = 5, \ .write_delay = 5, \ .self_test_mask = BIT(1), \ + .self_test_reg = ADIS16480_REG_GLOB_CMD, \ .status_error_msgs = adis16480_status_error_msgs, \ .status_error_mask = BIT(ADIS16480_DIAG_STAT_XGYRO_FAIL) | \ BIT(ADIS16480_DIAG_STAT_YGYRO_FAIL) | \ -- cgit