From patchwork Mon Nov 7 22:33:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Greco X-Patchwork-Id: 16745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2335707wru; Mon, 7 Nov 2022 14:36:16 -0800 (PST) X-Google-Smtp-Source: AMsMyM6iA4LZCJgS3SDINpR9wnHtbPT5p6PVu2L2HWccxk3lbxQCSNGP11SMSq5aE0OMIXFu64GF X-Received: by 2002:a17:903:2344:b0:186:e357:f3ac with SMTP id c4-20020a170903234400b00186e357f3acmr53370349plh.110.1667860575064; Mon, 07 Nov 2022 14:36:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667860575; cv=none; d=google.com; s=arc-20160816; b=QRfRVGyV3ALNhpSOigQp/WPLepOUGDVGcAu/cwEUJDwUIgG6oEbnCEbRbbd3QM/jvm giz+Bz2ex6qErdJ8KS95AmdPNuqO3QjidDfEQniHJTkrX0kjuonl+jdyUPrbFxfJoLdi 9BtTjIX2a3FDRuot9aQEBgZP3AwIESJIDye4SmeOw7YG2L4xPAyfU8Xda0T1WfAd7goH TE2C/PwVi/YFMULHTK1RfuejFK2XNC3sbEcLWK6sPfEwlYoiZKvcdRVC/lapDGb+Co3n NEN0g5Y168jLoTPcuvCxbj3e0+aR/MM4KJFYZA4VFPgFmoc7SfPpRf6mfo6OejqeAdz4 GhWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6Ib4kjWRNKGdX4d2nVwqGZtbzu1tyr3A6V/qHQUjjQ8=; b=ylCWY1YwmiK2RGtpUvKwrOLUqGVflJ15egIuVAG1ZDDp5NCiJQ1REsTyDhpDaIlM0U toBcFfflzmmFWtAqluqAS/Hrk0m8cFwHe3Bqhl7NyW/xOARMqYDMXAXNr4U+RoQOHAlG HhUfsnlbFqDWH7/WNwuU+I/DYZuEJGf+K89sIjh1fAD9uXXuo+LvxLOSn5NE7GXmvLQp 0yhcTCjwSjgGnY31c6iYOFkRF2er4dEVB6A4ddbI3wkreb85Wb90bjEgnnNqODKSDGLe DPWDlTHvl5/mJEGJVFDuGv5OOI3zVki98vBAjxVE49mzK8YtQTdey3KRQ/LErKOyxp9+ ISFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=uJQHK6iU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s30-20020a63525e000000b00439753f7df9si11631698pgl.667.2022.11.07.14.36.00; Mon, 07 Nov 2022 14:36:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=uJQHK6iU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232328AbiKGWeq (ORCPT + 99 others); Mon, 7 Nov 2022 17:34:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231812AbiKGWem (ORCPT ); Mon, 7 Nov 2022 17:34:42 -0500 Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FC817A9C; Mon, 7 Nov 2022 14:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1667860481; x=1699396481; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Ib4kjWRNKGdX4d2nVwqGZtbzu1tyr3A6V/qHQUjjQ8=; b=uJQHK6iU9j0JSB4kjcFeC7UT00Cb2dsV+yInbub2Y8xgJbqFFKBSviYR Xc8Y468HddNz7WPPq9LPf99EWX01xiauOLmsdv9PgHFVkCpar9F8De9hs dqFUqvOwAd/ZB3I7MQvIuk3mA6gUIUjl+U38Ue/Rzqoc427H/8RkJ3Lry Y=; X-IronPort-AV: E=Sophos;i="5.96,145,1665446400"; d="scan'208";a="260769434" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-1box-2bm6-32cf6363.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 22:34:40 +0000 Received: from EX13MTAUWB002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-1box-2bm6-32cf6363.us-west-2.amazon.com (Postfix) with ESMTPS id AD60481C5A; Mon, 7 Nov 2022 22:34:38 +0000 (UTC) Received: from EX19D035UWB004.ant.amazon.com (10.13.138.104) by EX13MTAUWB002.ant.amazon.com (10.43.161.202) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 7 Nov 2022 22:34:35 +0000 Received: from dev-dsk-grecojay-2b-e6934ae5.us-west-2.amazon.com (10.43.161.14) by EX19D035UWB004.ant.amazon.com (10.13.138.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.15; Mon, 7 Nov 2022 22:34:35 +0000 From: Jay Greco To: CC: , Jay Greco , "Jean-Baptiste Maneyrol" , Jonathan Cameron , Lars-Peter Clausen , Subject: [PATCH 1/2] iio: imu: inv_icm42600: Add support for icm42631 Date: Mon, 7 Nov 2022 22:33:50 +0000 Message-ID: <20221107223351.61142-2-grecojay@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221107223351.61142-1-grecojay@amazon.com> References: <20221107223351.61142-1-grecojay@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.14] X-ClientProxiedBy: EX13D48UWA004.ant.amazon.com (10.43.163.61) To EX19D035UWB004.ant.amazon.com (10.13.138.104) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748878505029382992?= X-GMAIL-MSGID: =?utf-8?q?1748878570037307586?= Add the required WHOAMI and device_id definitions to support the icm42631. Signed-off-by: Jay Greco --- 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(+) diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600.h b/drivers/iio/imu/inv_icm42600/inv_icm42600.h index 3d91469beccb..0e290c807b0f 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600.h +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600.h @@ -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 diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c index ca85fccc9839..12952739f749 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c @@ -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 * diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c index d4a692b838d0..38c36a655167 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c @@ -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, }, {} }; diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c index e6305e5fa975..6a85c12d38bd 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c @@ -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, }, {} }; From patchwork Mon Nov 7 22:33:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Greco X-Patchwork-Id: 16746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2335752wru; Mon, 7 Nov 2022 14:36:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6m4eI9fTMPAaW6PwHVW03Kdvqz464AK0NGxRLcg+YcAw0Yni3/cfG8r56SGQq0kFrZs3ay X-Received: by 2002:a17:903:11cf:b0:188:8294:e5b9 with SMTP id q15-20020a17090311cf00b001888294e5b9mr6748106plh.59.1667860587922; Mon, 07 Nov 2022 14:36:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667860587; cv=none; d=google.com; s=arc-20160816; b=dI4qQGU1vzMfq2kDrzYbPFnUfDyJ7EgBP2wTCUJHLQuUKpxf96roIOYmPEB8Dd6NJE 5HMD1Ovgz6CG8D+8WAEotUCU72Wjg6RADno7jRg+NknD81e4JlAiMJ+8dfXkahh9mMEV xDCqx7bbE2PNSE3iewHcIs+ItyXUK64w/g2px7Jlb+LboM1Ww7o8bbiaMUncfnn0Uk9p dTLxgRiT69Az2wqvU7qh05jWMi/PbASGEvpIsLqNNcVXa39xveUBe62rLbK+KA+arou7 i7jIsM9iINBxfvFZ71ZgshSzJWMXGOYROEzoklagYVIse87ktgmddR0XPe50vmsa8kNh XJgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rz44s32SzBaIslZ/a+ZFEBJu0zp3UqQQK8+5CHa7kYY=; b=Pp4no8jOBcmO8ruuY4ydDdOJFvEbEUJFnF8Vp8nzL2vyPG2c8ZDURpNoXTmpTQPwHw 2M54q50h0r4XxgZtfKxBTWPPY1ROqug2p2Cr7i1r2A902lLrhrSi+nuLxMnyDzsZ2qAN 6ACyUGUVtiKxcU6Cld/OEqWiDTvqnHbtLfZ8mgmsamVynoq9hT0ve08oRUDYnU+59877 Qn7fHoNTzd4nD3BczfKSRtfZ3knlwADm/hXIGfHRNUPP6G9qR7t7bIJ7iEdpM2+LUm56 +mE0Khfo6iyEaYm13fhactEDPl1IdTYrNAZys44LmLa/LzPFgAM9igcE7zafmG5tFaKz 1i/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=txKrQWoW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix10-20020a170902f80a00b0017f829330e3si10222009plb.70.2022.11.07.14.36.14; Mon, 07 Nov 2022 14:36:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=txKrQWoW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232387AbiKGWet (ORCPT + 99 others); Mon, 7 Nov 2022 17:34:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232060AbiKGWem (ORCPT ); Mon, 7 Nov 2022 17:34:42 -0500 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0044929C83; Mon, 7 Nov 2022 14:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1667860482; x=1699396482; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rz44s32SzBaIslZ/a+ZFEBJu0zp3UqQQK8+5CHa7kYY=; b=txKrQWoWlO9blvZlT4D1KwXk/MfLxHNX75wZkyYY/HakPvLhMq2LbwDB jrpDZBQPYhzVowl/f5ZiQ8oFzQakIC8bVImLyeLOmC8vXjYI7rkD9G0C1 bMX8vAPInbii2Wc/OXSAKgYMUVI/7PsgywhfVhAJEOsnSWvOGnWp2gvFH w=; X-IronPort-AV: E=Sophos;i="5.96,145,1665446400"; d="scan'208";a="148638493" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2c-m6i4x-fad5e78e.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 22:34:42 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2c-m6i4x-fad5e78e.us-west-2.amazon.com (Postfix) with ESMTPS id 09AA7A1255; Mon, 7 Nov 2022 22:34:40 +0000 (UTC) Received: from EX19D035UWB004.ant.amazon.com (10.13.138.104) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 7 Nov 2022 22:34:35 +0000 Received: from dev-dsk-grecojay-2b-e6934ae5.us-west-2.amazon.com (10.43.161.14) by EX19D035UWB004.ant.amazon.com (10.13.138.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.15; Mon, 7 Nov 2022 22:34:35 +0000 From: Jay Greco To: CC: , Jay Greco , "Jean-Baptiste Maneyrol" , Jonathan Cameron , Krzysztof Kozlowski , Lars-Peter Clausen , Rob Herring , , Subject: [PATCH 2/2] iio: imu: inv_icm42600: Add icm42631 documentation Date: Mon, 7 Nov 2022 22:33:51 +0000 Message-ID: <20221107223351.61142-3-grecojay@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221107223351.61142-1-grecojay@amazon.com> References: <20221107223351.61142-1-grecojay@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.14] X-ClientProxiedBy: EX13D48UWA004.ant.amazon.com (10.43.163.61) To EX19D035UWB004.ant.amazon.com (10.13.138.104) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748878583789547766?= X-GMAIL-MSGID: =?utf-8?q?1748878583789547766?= Update the required documentation for the icm42631. Signed-off-by: Jay Greco --- .../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml index 488349755c99..13c9abdd3131 100644 --- a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml +++ b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml @@ -31,6 +31,7 @@ properties: - invensense,icm42602 - invensense,icm42605 - invensense,icm42622 + - invensense,icm42631 reg: maxItems: 1