提交 2f3abe6c 编写于 作者: L Lars-Peter Clausen 提交者: Jonathan Cameron

iio:imu: Add support for the ADIS16480 and similar IMUs

This patch adds support for the ADIS16375, ADIS16480, ADIS16485, ADIS16488 6
degree to 10 degree of freedom IMUs.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 6807d721
#
# IIO imu drivers configuration
#
menu "Inertial measurement units"
config ADIS16480
tristate "Analog Devices ADIS16480 and similar IMU driver"
depends on SPI
select IIO_ADIS_LIB
select IIO_ADIS_LIB_BUFFER if IIO_BUFFER
help
Say yes here to build support for Analog Devices ADIS16375, ADIS16480,
ADIS16485, ADIS16488 inertial sensors.
endmenu
config IIO_ADIS_LIB
tristate
help
......
......@@ -2,6 +2,8 @@
# Makefile for Inertial Measurement Units
#
obj-$(CONFIG_ADIS16480) += adis16480.o
adis_lib-y += adis.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_trigger.o
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
......
......@@ -238,6 +238,9 @@ int adis_enable_irq(struct adis *adis, bool enable)
int ret = 0;
uint16_t msc;
if (adis->data->enable_irq)
return adis->data->enable_irq(adis, enable);
ret = adis_read_reg_16(adis, adis->data->msc_ctrl_reg, &msc);
if (ret)
goto error_ret;
......
此差异已折叠。
......@@ -20,6 +20,8 @@
#define ADIS_PAGE_SIZE 0x80
#define ADIS_REG_PAGE_ID 0x00
struct adis;
/**
* struct adis_data - ADIS chip variant specific data
* @read_delay: SPI delay for read operations in us
......@@ -44,6 +46,8 @@ struct adis_data {
const char * const *status_error_msgs;
unsigned int status_error_mask;
int (*enable_irq)(struct adis *adis, bool enable);
bool has_paging;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册