You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
committed by
Jonathan Cameron
parent
6807d72113
commit
2f3abe6cbb
@@ -1,3 +1,19 @@
|
|||||||
|
#
|
||||||
|
# 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
|
config IIO_ADIS_LIB
|
||||||
tristate
|
tristate
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
# Makefile for Inertial Measurement Units
|
# Makefile for Inertial Measurement Units
|
||||||
#
|
#
|
||||||
|
|
||||||
|
obj-$(CONFIG_ADIS16480) += adis16480.o
|
||||||
|
|
||||||
adis_lib-y += adis.o
|
adis_lib-y += adis.o
|
||||||
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_trigger.o
|
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_trigger.o
|
||||||
adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.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;
|
int ret = 0;
|
||||||
uint16_t msc;
|
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);
|
ret = adis_read_reg_16(adis, adis->data->msc_ctrl_reg, &msc);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_ret;
|
goto error_ret;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,8 @@
|
|||||||
#define ADIS_PAGE_SIZE 0x80
|
#define ADIS_PAGE_SIZE 0x80
|
||||||
#define ADIS_REG_PAGE_ID 0x00
|
#define ADIS_REG_PAGE_ID 0x00
|
||||||
|
|
||||||
|
struct adis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct adis_data - ADIS chip variant specific data
|
* struct adis_data - ADIS chip variant specific data
|
||||||
* @read_delay: SPI delay for read operations in us
|
* @read_delay: SPI delay for read operations in us
|
||||||
@@ -44,6 +46,8 @@ struct adis_data {
|
|||||||
const char * const *status_error_msgs;
|
const char * const *status_error_msgs;
|
||||||
unsigned int status_error_mask;
|
unsigned int status_error_mask;
|
||||||
|
|
||||||
|
int (*enable_irq)(struct adis *adis, bool enable);
|
||||||
|
|
||||||
bool has_paging;
|
bool has_paging;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user