mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
iio: imu: inv_icm42600: add icm40608
By comparing icm40608 datasheet with icm42600, it can use icm426xx driver directly. Change-Id: If856076ed4f57df6ba5bbb339a35b119937c6385 Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
433f0ced6f
commit
15752dea8b
@@ -17,6 +17,7 @@
|
||||
#include "inv_icm42600_buffer.h"
|
||||
|
||||
enum inv_icm42600_chip {
|
||||
INV_CHIP_ICM40608,
|
||||
INV_CHIP_ICM42600,
|
||||
INV_CHIP_ICM42602,
|
||||
INV_CHIP_ICM42605,
|
||||
@@ -298,6 +299,7 @@ struct inv_icm42600_state {
|
||||
#define INV_ICM42600_INT_SOURCE0_UI_AGC_RDY_INT1_EN BIT(0)
|
||||
|
||||
#define INV_ICM42600_REG_WHOAMI 0x0075
|
||||
#define INV_ICM42600_WHOAMI_ICM40608 0x39
|
||||
#define INV_ICM42600_WHOAMI_ICM42600 0x40
|
||||
#define INV_ICM42600_WHOAMI_ICM42602 0x41
|
||||
#define INV_ICM42600_WHOAMI_ICM42605 0x42
|
||||
|
||||
@@ -67,6 +67,11 @@ static const struct inv_icm42600_conf inv_icm42600_default_conf = {
|
||||
};
|
||||
|
||||
static const struct inv_icm42600_hw inv_icm42600_hw[INV_CHIP_NB] = {
|
||||
[INV_CHIP_ICM40608] = {
|
||||
.whoami = INV_ICM42600_WHOAMI_ICM40608,
|
||||
.name = "icm40608",
|
||||
.conf = &inv_icm42600_default_conf,
|
||||
},
|
||||
[INV_CHIP_ICM42600] = {
|
||||
.whoami = INV_ICM42600_WHOAMI_ICM42600,
|
||||
.name = "icm42600",
|
||||
|
||||
@@ -70,6 +70,9 @@ static int inv_icm42600_probe(struct i2c_client *client)
|
||||
|
||||
static const struct of_device_id inv_icm42600_of_matches[] = {
|
||||
{
|
||||
.compatible = "invensense,icm40608",
|
||||
.data = (void *)INV_CHIP_ICM40608,
|
||||
}, {
|
||||
.compatible = "invensense,icm42600",
|
||||
.data = (void *)INV_CHIP_ICM42600,
|
||||
}, {
|
||||
|
||||
@@ -69,6 +69,9 @@ static int inv_icm42600_probe(struct spi_device *spi)
|
||||
|
||||
static const struct of_device_id inv_icm42600_of_matches[] = {
|
||||
{
|
||||
.compatible = "invensense,icm40608",
|
||||
.data = (void *)INV_CHIP_ICM40608,
|
||||
}, {
|
||||
.compatible = "invensense,icm42600",
|
||||
.data = (void *)INV_CHIP_ICM42600,
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user