summaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/imu/adis.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h
index 6402a08c0e6..e82cd0827e9 100644
--- a/include/linux/iio/imu/adis.h
+++ b/include/linux/iio/imu/adis.h
@@ -14,8 +14,11 @@
#include <linux/interrupt.h>
#include <linux/iio/types.h>
-#define ADIS_WRITE_REG(reg) (0x80 | (reg))
-#define ADIS_READ_REG(reg) (reg)
+#define ADIS_WRITE_REG(reg) ((0x80 | (reg)))
+#define ADIS_READ_REG(reg) ((reg) & 0x7f)
+
+#define ADIS_PAGE_SIZE 0x80
+#define ADIS_REG_PAGE_ID 0x00
/**
* struct adis_data - ADIS chip variant specific data
@@ -40,6 +43,8 @@ struct adis_data {
const char * const *status_error_msgs;
unsigned int status_error_mask;
+
+ bool has_paging;
};
struct adis {
@@ -51,6 +56,7 @@ struct adis {
struct mutex txrx_lock;
struct spi_message msg;
struct spi_transfer *xfer;
+ unsigned int current_page;
void *buffer;
uint8_t tx[10] ____cacheline_aligned;