iio: imu: inv_icm42600: Add support for icm42631
Subsystems (3)
v2 cover iio: imu: inv_icm42600: Add support for icm42631
This patch adds support for the invensense icm42631 as part of the inv_icm42600 family driver within the IIO subsystem. The patch series also includes the requisite changes to the dt-bindings documentation.
Changes in v2:
- Fix documentation subject prefix per Krzysztof Kozlowski
Changes in v1:
- initial patch submission
Jay Greco (2):
iio: imu: inv_icm42600: Add support for icm42631
dt-bindings: iio: imu: Add inv_icm42600 documentation
.../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 5 +++++ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 +++ 5 files changed, 14 insertions(+)
Signature · 1 line
2.37.1
PATCH v2 1/2 iio: imu: inv_icm42600: Add support for icm42631
Add the required WHOAMI and device_id definitions to support the icm42631.
---
(no changes since v1)
drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 5 +++++ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 +++ 4 files changed, 13 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +2 -0
@@ -22,6 +22,7 @@ enum inv_icm42600_chip {INV_CHIP_ICM42602 ,INV_CHIP_ICM42605 ,INV_CHIP_ICM42622 , +INV_CHIP_ICM42631 , INV_CHIP_NB, };
@@ -303,6 +304,7 @@ struct inv_icm42600_state {#define INV_ICM42600_WHOAMI_ICM42602 0x41#define INV_ICM42600_WHOAMI_ICM42605 0x42#define INV_ICM42600_WHOAMI_ICM42622 0x46 +#define INV_ICM42600_WHOAMI_ICM42631 0x5C/* User bank 1 (MSB 0x10) */ #define INV_ICM42600_REG_SENSOR_CONFIG0 0x1003
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +5 -0
@@ -87,6 +87,11 @@ static const struct inv_icm42600_hw inv_icm42600_hw[INV_CHIP_NB] = { .name = "icm42622", .conf = &inv_icm42600_default_conf, }, + [INV_CHIP_ICM42631] = { + .whoami = INV_ICM42600_WHOAMI_ICM42631, + .name = "icm42631", + .conf = &inv_icm42600_default_conf, + }, }; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +3 -0
@@ -84,6 +84,9 @@ static const struct of_device_id inv_icm42600_of_matches[] = { }, { .compatible = "invensense,icm42622", .data = (void *)INV_CHIP_ICM42622, + }, { + .compatible = "invensense,icm42631", + .data = (void *)INV_CHIP_ICM42631, }, {} };
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +3 -0
@@ -80,6 +80,9 @@ static const struct of_device_id inv_icm42600_of_matches[] = { }, { .compatible = "invensense,icm42622", .data = (void *)INV_CHIP_ICM42622, + }, { + .compatible = "invensense,icm42631", + .data = (void *)INV_CHIP_ICM42631, }, {} };
Signature · 1 line
2.37.1
Hello Jay,
looks good, thanks for the patch.
Thanks,
JB
From: Jay Greco <[email protected]>
Sent: Thursday, November 10, 2022 20:29
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Jay Greco <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>; Jonathan Cameron <[email protected]>; Lars-Peter Clausen <[email protected]>; [email protected] <[email protected]>
Subject: [PATCH v2 1/2] iio: imu: inv_icm42600: Add support for icm42631
CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
Add the required WHOAMI and device_id definitions to support the icm42631.
---
(no changes since v1)
drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 5 +++++ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 +++
4 files changed, 13 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +0 -0
@@ -22,6 +22,7 @@ enum inv_icm42600_chip {
INV_CHIP_ICM42602,
INV_CHIP_ICM42605,
INV_CHIP_ICM42622,
+ INV_CHIP_ICM42631,
INV_CHIP_NB,
};
@@ -303,6 +304,7 @@ struct inv_icm42600_state { #define INV_ICM42600_WHOAMI_ICM42602 0x41 #define INV_ICM42600_WHOAMI_ICM42605 0x42 #define INV_ICM42600_WHOAMI_ICM42622 0x46 +#define INV_ICM42600_WHOAMI_ICM42631 0x5C
/* User bank 1 (MSB 0x10) */
#define INV_ICM42600_REG_SENSOR_CONFIG0 0x1003
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +0 -0
@@ -87,6 +87,11 @@ static const struct inv_icm42600_hw inv_icm42600_hw[INV_CHIP_NB] = {
.name = "icm42622",
.conf = &inv_icm42600_default_conf, },
+ [INV_CHIP_ICM42631] = {
+ .whoami = INV_ICM42600_WHOAMI_ICM42631, + .name = "icm42631",
+ .conf = &inv_icm42600_default_conf, + },
};
const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +0 -0
@@ -84,6 +84,9 @@ static const struct of_device_id inv_icm42600_of_matches[] = {
}, {
.compatible = "invensense,icm42622", .data = (void *)INV_CHIP_ICM42622, + }, {
+ .compatible = "invensense,icm42631", + .data = (void *)INV_CHIP_ICM42631, },
{}
};
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +0 -0
@@ -80,6 +80,9 @@ static const struct of_device_id inv_icm42600_of_matches[] = {
}, {
.compatible = "invensense,icm42622", .data = (void *)INV_CHIP_ICM42622, + }, {
+ .compatible = "invensense,icm42631", + .data = (void *)INV_CHIP_ICM42631, },
{}
};
Signature · 1 line
2.37.1
PATCH v2 2/2 dt-bindings: iio: imu: Add inv_icm42600 documentation
In reply to Jay GrecoUpdate the required documentation for the icm42631.
---
(no changes since v1)
.../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml +1 -0
@@ -31,6 +31,7 @@ properties: - invensense,icm42602 - invensense,icm42605 - invensense,icm42622 + - invensense,icm42631 reg: maxItems: 1
Signature · 1 line
2.37.1
Re: [PATCH v2 2/2] dt-bindings: iio: imu: Add inv_icm42600 documentation
Hello Jay,
looks good, thanks for the patch.
Thanks,
JB
From: Jay Greco <[email protected]>
Sent: Thursday, November 10, 2022 20:29
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Jay Greco <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>; Jonathan Cameron <[email protected]>; Krzysztof Kozlowski <[email protected]>; Lars-Peter Clausen <[email protected]>; Rob Herring <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: [PATCH v2 2/2] dt-bindings: iio: imu: Add inv_icm42600 documentation
CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.
Update the required documentation for the icm42631.
---
(no changes since v1)
.../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 +
1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml +0 -0
@@ -31,6 +31,7 @@ properties:
- invensense,icm42602
- invensense,icm42605
- invensense,icm42622
+ - invensense,icm42631
reg:
maxItems: 1
Signature · 1 line
2.37.1
Re: [PATCH v2 2/2] dt-bindings: iio: imu: Add inv_icm42600 documentation
In reply to Jay GrecoQuoted 5 lines · Jay Greco
Update the required documentation for the icm42631.
Signed-off-by Jay Greco <[email protected]>---
Best regards,
Krzysztof
Quoted 9 lines · On Thu, 10 Nov 2022 19:29:31 +0000 Jay Greco <[email protected]> wrote:
This patch adds support for the invensense icm42631 as part of the
inv_icm42600family driver within the IIO subsystem. The patch series also includes the requisite changes to the dt-bindings documentation.Changes in v2:
- Fix documentation subject prefix per Krzysztof KozlowskiChanges in v1:
- initial patch submission
Hi Jay,
Applied to the togreg branch of iio.git which I will shortly push out as testing to give the various automated build systems the opportunity to see if they can find anything we missed.
Welcome to IIO btw.
Thanks,
Jonathan
Quoted 12 lines
Jay Greco (2):
iio: imu:inv_icm42600: Add support for icm42631
dt-bindings: iio: imu: Addinv_icm42600documentation.../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600.h | 2 ++ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 5 +++++ drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 3 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 +++ 5 files changed, 14 insertions(+)