From patchwork Mon Jan 20 09:36:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CC4E921 for ; Mon, 20 Jan 2020 09:36:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30417207FD for ; Mon, 20 Jan 2020 09:36:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="A09odEJu"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="W8VPi6vk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbgATJgx (ORCPT ); Mon, 20 Jan 2020 04:36:53 -0500 Received: from mx0a-00328301.pphosted.com ([148.163.145.46]:5392 "EHLO mx0a-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgATJgw (ORCPT ); Mon, 20 Jan 2020 04:36:52 -0500 Received: from pps.filterd (m0156134.ppops.net [127.0.0.1]) by mx0a-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9Tq6R007127; Mon, 20 Jan 2020 01:36:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=DrWVSr7Cs3DFBetOePiInj5YUVsHPg01H9tlrc3z8hM=; b=A09odEJuoLFB2tTBnZLKiyW0zUTrJkDfcQtd14lW6og54lgkEHoqV6A/pqvHDK38XcIm wQxHgZXv4EDIhV8ssPaC8FTBoIJxmj/fiOZdhHzZ2Pa7eTWe3VSko600iiKszvCtM7oq p19K6+R3n59bLcdQcv0QsHtfXmublThKgZf4oOQEGK2evS1CgiKuKfJ8v+05SGPUAcHP rTxt/UI+BncNGDZUyvIcvzdhWoKjCcTxH+97kPrSUAMWoWL6Ob5mTRhaFqLttsLSQFdU cE16Bw0mlXbwNVBN6NCIj4PKiLmwUjsWd6cx0wFdJ8eZtAKX9+n7yD7vo6jlhCxRJDEb tA== Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2055.outbound.protection.outlook.com [104.47.46.55]) by mx0a-00328301.pphosted.com with ESMTP id 2xm1gqrmsx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:36:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EgFbtGMqaxoTi85+pnrFNesjpVWgO53p5TovXhMPr0eC5CBMe24lMe8SKTQk6miEFQChs9pmku7ER5H2nW5AdbbJcFXFLVVaMe6eOP+pFWTOk8l1nURmfG1PELiL1NSUxMcTukesMRwLEFnyqgqsPt1XtscuROApUWnp7J72fw6K5x47g2dqxjFXVrpDF6AaWOlHJTF2U8m6MTmA99VyQQeQHqzUDpSidQMXMBDfURriyZbePJ8H5uaDtibKEV0DTlBjTnKy/7ePD0z/L92vixfcBNl3tSKvmyGCYDsACsMHsyJIUJDyiUgZuDXCr4JMm4RM1cFV3AatGDBe9PDW0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DrWVSr7Cs3DFBetOePiInj5YUVsHPg01H9tlrc3z8hM=; b=Ce4qva6e05BKEzrStmluWZaDo5UINK9wHx8+sHAuircNV5kXPXnB4N/tjGjkvaY1nKH7HzAcmrsAPvPl2FsfBVL9LGX/Hv2g7z78NypW+mTu7rXlO707wquolMsOVLMJ+uSKXVzI5VeU4tXFEvLXMh1OtoWNZ4G1RWq/KlHFZavg1hged+g54X0REMB+d5cT7yk3shtjF7yJ15SrBmUTUJMpINOZqnJSLJbanDQntoGd5sVby42Yxzzhy9WE2vZXVVSNamPh+FYcjlTLMLpJ43Aim9xqxDt9UW5EdplDqeZw1ilywjlHUg2Mrl6NAYeUjje1vfXSbnabKKfHrg5rYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DrWVSr7Cs3DFBetOePiInj5YUVsHPg01H9tlrc3z8hM=; b=W8VPi6vkb7FC6B+jrKMfHl4K7l6Zw2AkjFeEqkYtIZi55r9Ds48+VL54UyvdrjFTijxElgkHpvvDbdOHwFN1uZYLwod1BibH5wSI27N6X7mMmanLnBxRPq+PmeJ9xNLTRfjT77/IAKqSVBAOkb8uz3K1LBbBTWDazZ5XELyqkFQ= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB3183.namprd12.prod.outlook.com (20.179.82.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.23; Mon, 20 Jan 2020 09:36:47 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:36:47 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 1/9] dt-bindings: iio: imu: inv_mpu6050: add missing entry for mpu6000 Date: Mon, 20 Jan 2020 10:36:12 +0100 Message-Id: <20200120093620.9681-2-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:44 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 072fb128-26c7-4879-3a6c-08d79d8c4463 X-MS-TrafficTypeDiagnostic: MN2PR12MB3183: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:374; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39840400004)(396003)(376002)(346002)(136003)(366004)(199004)(189003)(966005)(7696005)(52116002)(6666004)(8936002)(478600001)(186003)(16526019)(8676002)(86362001)(2906002)(26005)(316002)(81156014)(81166006)(54906003)(956004)(107886003)(2616005)(6486002)(1076003)(4744005)(66946007)(36756003)(5660300002)(66556008)(4326008)(66476007)(562404015);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB3183;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cjnOrl9vUajdPaPXPSngrT+epR5Avrct+7zhgT3JwvuEcsy9cMzl9UHJCSqkaQ6WFnewlGNSlCIAZnGcFG18SENnc45n3UweVg06pbGRRjH/p7pQBQ05x8sZfXar58HVzmqCFOro2+z+eLpn9lXkivNIo15/yjWAH9YsE+ADiXuh6TdqlOTlgjH1Xqy8KSK/ahftb6Yp8yPgu7JgurQzJKzCgTn2ue0TQT9IP7XXj5daetDR4YQMICDbJ//9TcqE3okxvHbwF+G7Ig3rrunCnsjoYF+1dctQH6tWZBQLWwxBKWE//cs9HXNqS3Mm6zrFZonRPVP1WILQSVPU0qDCw/4WfBC9sYmCXBQG2AGrScwE6QQvcwAkk3Xktx6idFE8OsC2TzOO63Untaoiik6Kd++wyl+gEbtqH4JVIipw/cC84xsP/FEqVv1U36ivZneyXMqKvS1qNJoaDwwOkyr8Jzxim9/AT0s1qgHJOHSxT+FDNSWntTBhbUrYHzVv3mKVgnb7pvHq2+2ffnD2wkX8pP418xwUWjGLEQeut/nk90+WfNfnFium7cXQ5/MuNROP X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 072fb128-26c7-4879-3a6c-08d79d8c4463 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:36:46.9767 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: b0ZOYJ+DtFXzcdPZ1Q49kgFkUh/9gA0I4mAEnCxfrTRz/PznMDh8ECpFZQ80r1yF9mf24MglKRf/5YY3HM6TEXn+Ix1X0ZWDh0cg0Fez5i4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3183 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=883 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org mpu6000 is spi only. Signed-off-by: Jean-Baptiste Maneyrol --- Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt index c5ee8a20af9f..38483ea31fd4 100644 --- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt +++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt @@ -4,6 +4,7 @@ http://www.invensense.com/mems/gyro/mpu6050.html Required properties: - compatible : should be one of + "invensense,mpu6000" "invensense,mpu6050" "invensense,mpu6500" "invensense,mpu6515" From patchwork Mon Jan 20 09:36:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341607 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96E43924 for ; Mon, 20 Jan 2020 09:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B558207E0 for ; Mon, 20 Jan 2020 09:47:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="bFnIGnGT"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="kOZzVrqX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726417AbgATJrk (ORCPT ); Mon, 20 Jan 2020 04:47:40 -0500 Received: from mx0b-00328301.pphosted.com ([148.163.141.47]:33682 "EHLO mx0b-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbgATJrk (ORCPT ); Mon, 20 Jan 2020 04:47:40 -0500 Received: from pps.filterd (m0156136.ppops.net [127.0.0.1]) by mx0b-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9TH3t026090; Mon, 20 Jan 2020 01:36:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=/5hRh3bqV5FuP/EiZShBt80tAOVBpvt6lGTGyj/Is1U=; b=bFnIGnGTMt+N9MYOTf6EC9epBrVeTf8AxRhU7G7tkJZtRBwrc7UHMCEhXGh+vv9Jafm1 YWgR3vQe9arhrXXDdM0+DfSZgMdpHnd0pZL9LTKQZ+98SMkZCjDhc0fUhAU6oIiQEXb4 5A2krvXKufSWCxWlMiMzEzX7ICN0GPuiNsEGgXGnHneZ8DLfbzJxZVUekSn2K1IBG+mp B0AEAjMNFXfHQdDADXIo620pqhe6FnDqRguqxp6b5jG9PahJs938RzYliIFnX8ZpgotP ciuxct9SIvRM+Y8TkjNDUd+zbyslZG41kQk8Hy59DTH8EDHHrgOgChloMmtzZezmkJlj hA== Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2052.outbound.protection.outlook.com [104.47.46.52]) by mx0b-00328301.pphosted.com with ESMTP id 2xkxuu0mxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:36:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EzExk3b/rF6X0ELt9tGDFjTSUxqBYOm7bxMnrIhWN41jEvqpyLC55um/gMGuupqkH6yMmDJYEvj5tBT/6N6JZZCsp2PQPaoyqAOLwFEGXlC10KFR0fa/JhGwOsNYg0Pmd3O9sBwKLtBpazVXksQFb3U2JLXm4ElASBLcONOgkGFaYtFQBVcSbqmBatBqMgyL0ahSrrHsf+9hIFLvzeC+DLKs4jE6FpfR0NLTZ672MtGOjTA7ipHroI0OqsLdiPeXvQsUG3GqmY6bCbq3CdBsE2q+alJSoJfLJMDTWSy0tSf5JxAwgYPw5v88ufMDqekm0LNztVwmEa/BsdjQ98vT0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/5hRh3bqV5FuP/EiZShBt80tAOVBpvt6lGTGyj/Is1U=; b=aLzDbo1yveqRb559MAimjm+ekpxT1jGWyRyCaxCFkzvPZ4XLwngPIyO05g35NB/6PGio4zFbczQMPPI0rTfmM+EkSv0A3oKkD6sG/2yBiBCJbXqARTxtBURQa6JOL+LXAKwRZrFHiCWZ3+ZL5FeRWE0u3YKmvj2XsBTsIc+22hpG8lqXyvdBBWr9St2g7mU88x86hVSSTcQqylp+Qs680lFa/OTDpQ+zyUl3AzlmlglMP4pSvpkHvnqq5p1zxrw9aklxBj+6bQnmv/UAQA4c3uX8Ve21ywiIOTQw7YQhoVQvCCrfPGMyFndmcF+1WwBE8WlOb+oVLXP5iCuLw1ffJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/5hRh3bqV5FuP/EiZShBt80tAOVBpvt6lGTGyj/Is1U=; b=kOZzVrqXFEncTQ6J1X7sEH/HHZSikraBHXcRX3EknTfnBRB242De4IJmEEJ8Gl1z3JoyBK1/TiXQj79x3zMC1It+UvrmOXLdCbIgCO6xKalD6mQCEqoJfRd3C29e6F+R9VvpF0yzAvhZlmoHQZ7OjNWwsdFp2LHCQv7npdqYNjc= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB3183.namprd12.prod.outlook.com (20.179.82.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.23; Mon, 20 Jan 2020 09:36:49 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:36:49 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 2/9] iio: imu: inv_mpu6050: cleanup spi support Date: Mon, 20 Jan 2020 10:36:13 +0100 Message-Id: <20200120093620.9681-3-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:47 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de6ac665-5dbe-4601-9f0b-08d79d8c4628 X-MS-TrafficTypeDiagnostic: MN2PR12MB3183: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39840400004)(396003)(376002)(346002)(136003)(366004)(199004)(189003)(7696005)(52116002)(6666004)(8936002)(478600001)(186003)(16526019)(8676002)(86362001)(2906002)(26005)(316002)(81156014)(81166006)(54906003)(956004)(107886003)(2616005)(6486002)(1076003)(66946007)(36756003)(5660300002)(66556008)(4326008)(66476007);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB3183;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b3P8OjdeHi7RJlw59ZcV6xhD5zACxx3FeytrY1J6bsAbzUWxIImF9JjB+nvUE3WQE7eoOsUf9qJUF0rm0iESdtHi7YugOvHuaobr0CCYp3sbwTtGq5detposdwlzwvx6PrnEpgd9pytz8ICmpBhFvZjJQ4oqbgXy5cC3zRa2gDQaPaSdlnApnFNgCBIeqTC9Y9QIXau65D1M/Vz3AP62dZmmjmqjAbPqW/sKEMtSFkgB1hAKPw/+3UW3XAeBwWtVe4P118+o0L8oJiuqp5UO599b0YFchNh30TJv8SHQ6osR7L/+Wjgoq3q/8k37HE1Qwj+NlIzSg3sP+F/4W0WOtoU/5P/UdtBb/xHVeuJ9+ke3Fr99SE/ymc4s2wd/M+YDYCzOMSJZRblMm7dcyIbkZn08agmcWHHBW5V7x57aosu/gsze2UXyTqHSlY5nDOnk X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: de6ac665-5dbe-4601-9f0b-08d79d8c4628 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:36:49.7432 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SZv/qM+9jtO9aFaGVTAmeZ6KWF4/m5CHfo/HQqdo6JWPDdKLWiZW7rrEaSzVzc9eLXxGcy/BgpdRibj1o8EgCLdqmhZg076IOppUjeWoATo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3183 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Add missing mpu6515 support and add of match table. Reorganize Kconfig to display chips grouped by generations. Signed-off-by: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_mpu6050/Kconfig | 8 +++--- drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 35 +++++++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index 017bc0fcc365..003134734646 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig @@ -15,8 +15,8 @@ config INV_MPU6050_I2C select INV_MPU6050_IIO select REGMAP_I2C help - This driver supports the Invensense MPU6050/6500/6515, - MPU9150/9250/9255 and ICM20608/20602 motion tracking devices + This driver supports the Invensense MPU6050/9150, + MPU6500/6515/9250/9255, ICM20608 and ICM20602 motion tracking devices over I2C. This driver can be built as a module. The module will be called inv-mpu6050-i2c. @@ -27,8 +27,8 @@ config INV_MPU6050_SPI select INV_MPU6050_IIO select REGMAP_SPI help - This driver supports the Invensense MPU6000/6500/6515, - MPU9250/9255 and ICM20608/20602 motion tracking devices + This driver supports the Invensense MPU6000, + MPU6500/6515/9250/9255, ICM20608 and ICM20602 motion tracking devices over SPI. This driver can be built as a module. The module will be called inv-mpu6050-spi. diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index ec102d5a5c77..f7276f9d83fc 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -74,6 +74,7 @@ static int inv_mpu_probe(struct spi_device *spi) static const struct spi_device_id inv_mpu_id[] = { {"mpu6000", INV_MPU6000}, {"mpu6500", INV_MPU6500}, + {"mpu6515", INV_MPU6515}, {"mpu9250", INV_MPU9250}, {"mpu9255", INV_MPU9255}, {"icm20608", INV_ICM20608}, @@ -83,6 +84,39 @@ static const struct spi_device_id inv_mpu_id[] = { MODULE_DEVICE_TABLE(spi, inv_mpu_id); +static const struct of_device_id inv_of_match[] = { + { + .compatible = "invensense,mpu6000", + .data = (void *)INV_MPU6000 + }, + { + .compatible = "invensense,mpu6500", + .data = (void *)INV_MPU6500 + }, + { + .compatible = "invensense,mpu6515", + .data = (void *)INV_MPU6515 + }, + { + .compatible = "invensense,mpu9250", + .data = (void *)INV_MPU9250 + }, + { + .compatible = "invensense,mpu9255", + .data = (void *)INV_MPU9255 + }, + { + .compatible = "invensense,icm20608", + .data = (void *)INV_ICM20608 + }, + { + .compatible = "invensense,icm20602", + .data = (void *)INV_ICM20602 + }, + { } +}; +MODULE_DEVICE_TABLE(of, inv_of_match); + static const struct acpi_device_id inv_acpi_match[] = { {"INVN6000", INV_MPU6000}, { }, @@ -93,6 +127,7 @@ static struct spi_driver inv_mpu_driver = { .probe = inv_mpu_probe, .id_table = inv_mpu_id, .driver = { + .of_match_table = inv_of_match, .acpi_match_table = ACPI_PTR(inv_acpi_match), .name = "inv-mpu6000-spi", .pm = &inv_mpu_pmops, From patchwork Mon Jan 20 09:36:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341603 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BA7113A4 for ; Mon, 20 Jan 2020 09:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9E8B207FD for ; Mon, 20 Jan 2020 09:47:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="UV1ZhKZG"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="NtTIjF/2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726465AbgATJrj (ORCPT ); Mon, 20 Jan 2020 04:47:39 -0500 Received: from mx0b-00328301.pphosted.com ([148.163.141.47]:32814 "EHLO mx0b-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgATJrj (ORCPT ); Mon, 20 Jan 2020 04:47:39 -0500 X-Greylist: delayed 642 seconds by postgrey-1.27 at vger.kernel.org; Mon, 20 Jan 2020 04:47:37 EST Received: from pps.filterd (m0156136.ppops.net [127.0.0.1]) by mx0b-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9RdO7025311; Mon, 20 Jan 2020 01:36:53 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=GE62sdKSX3LGUqRw6XwcVtitfaMeR56KCsErcKwEREY=; b=UV1ZhKZGL/GAXMgVBb3Pbda4wthczgg+zBQfscwXQw9hQ5yL5atPGNdGFgkOEHpVBG1f HXOLHeSt1K1Zw8e5PNSCXzo8dwhCTlYFK1SHzFb+Xr0TQCltLIVeio8sbIcD9s1OToe8 AxvJpKqBjt85FmTvO3wTfQAT1UerSesxk00PnGY5MzH6k28XRdb1UIE6IgpT9KQMHaGg f9vZk5k4S4CiukdT41saCZ5Q3E1JGCOdsZbz7NEzsQ/0Wx7pqoH51vKsh+Fqtkw21xhy TOC1URSS0fGaVdZXewXBgDyeuIcDw/R8JMtjlRMj/616GJRXoN4OOhA69gYc4j9Z0bFh 9g== Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2053.outbound.protection.outlook.com [104.47.46.53]) by mx0b-00328301.pphosted.com with ESMTP id 2xkxuu0mxc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:36:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fke8yOs8eo9n1tXQPOOm6mGOn8geLKBPckh0lrwalwpcSPZU1bF7SzG9TR1iD3F36F1zW58TZE55C/k6fJhmEVI/ye4sWWwfkbMRBwD7DNI1wkeSMw0iqIG+g+NHzO7FeT0chiIBeOdmwbZjRMTCFSSk/msnOib5wUuVaI6JNAqz7ZGo8NOjElw28KeL0zTB1fxw/W9ihS5STO6H30pmwUokDgJI/VDZUhe6r36wsFTXvXavSgOcDruiBD4cJiYmpsouc5/kt+zlqN7JPPPh8nw6dXhj2kX6PiWR2RpkgH1SgFx3xQAcp8akrILU8cArbQiLL4innCkg7fEGkm0fjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GE62sdKSX3LGUqRw6XwcVtitfaMeR56KCsErcKwEREY=; b=aEFdko3gQxxs5+kOeApKvx65Q6tKMhmkO7XTh5PKbtt0UaGevp7JVAhWdVC3zq++x2aLCoiRW+6YOeCUba3X206yMEzZXWRQcDUL83I24G0/YgSdDehtnwHt0mrykvJXuGknlDhi/hc9lXGWuNCsCiOGrvqxLBistfH76lVOcPG41cVtnrmuerkywyH1YB7moq7cVZuWRBQxFKD3V0sEBQjl/05AtDFbsVHkP4h9xv7ws/DUzJ4YvOJTCMOz3Uv3Ypr5k4OvHFEuDXJfAwA2gEZiHuBRARAm0f7UtWqRT9a5bGK+TZ2jw00pC2IhsOSd8XmiTfKrI7hIT2MHyeLLiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GE62sdKSX3LGUqRw6XwcVtitfaMeR56KCsErcKwEREY=; b=NtTIjF/20zhNYGqkjjce1K9yK5UXkhCw2ejmHFNK06u/5Z7ZFV07TeW08cOUwcO8XpRgID/gVMeGzhWVurom6OuMtw9zOT5nU7xk9Rut5n0gXvyCLPewHEyCzRL8PIr4QzTscYvStysyPHiFHH6s8HujHDwM3a/wWLrxS5NE1K0= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB3183.namprd12.prod.outlook.com (20.179.82.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.23; Mon, 20 Jan 2020 09:36:52 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:36:52 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 3/9] iio: imu: inv_mpu6050: add support of ICM20609 & ICM20689 Date: Mon, 20 Jan 2020 10:36:14 +0100 Message-Id: <20200120093620.9681-4-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:50 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93f34402-ca0f-4b9f-6556-08d79d8c47cb X-MS-TrafficTypeDiagnostic: MN2PR12MB3183: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39840400004)(396003)(376002)(346002)(136003)(366004)(199004)(189003)(7696005)(52116002)(6666004)(8936002)(478600001)(186003)(16526019)(8676002)(86362001)(2906002)(26005)(316002)(81156014)(81166006)(54906003)(956004)(107886003)(2616005)(6486002)(1076003)(66946007)(36756003)(5660300002)(66556008)(4326008)(66476007);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB3183;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jrZ22wBTl02MWlpL1e8ThClCnIAqYTmZ/tYM1gFsPYy331j+4855aPoOrS5ItnGY3R1h1nuiaWZubiz4CBLyfiizFAJ9rXS44qgx2IDj8u/hAc5JqfGiKgndRxzZiFoUkzSmQPQeA3csowh2y2bW1KmUQMe3jENFIYpFkr3KFMN58wTTByJDCeWlHDe4trg5/mg1MswButruPLPtuNvTUy51MQNPNLN1keRGzO/nuQNZqm+e7LvvIF5PrKFlXyyal161qkHYbQVOr3fCb5UFZultrscX3B+zq8hu2tgMRz6E1pppr06CKUsMGWkq092QMBfx8HQDbczl7+QNxdME2GvUaHf6xR9RkT4Cf23Bt2XF3vCzxSTzZ1MTiCd5ukd7x1LrznN5iRyZzox7Rte1z1ql3ScU2NZ6uz8+SqMlVQTyRmxXGSKTNiQ3v4JAQ1Zl X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93f34402-ca0f-4b9f-6556-08d79d8c47cb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:36:52.5007 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 99bOXE45RY0P1GylR7z/Ew+oRSQY5OvPsqn+Gxqp3vXVyjXghHOxVkadEWy8Gbj+Ai7dsJzVqpPdIXAPRXtdz9zYFQ6xXKCD3tqOsc4O9UM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3183 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org They are similar to ICM20608 chip. Signed-off-by: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_mpu6050/Kconfig | 8 +++---- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 26 ++++++++++++++++++---- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 12 ++++++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 5 +++++ drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 10 +++++++++ 5 files changed, 53 insertions(+), 8 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index 003134734646..e933db3a5a89 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig @@ -16,8 +16,8 @@ config INV_MPU6050_I2C select REGMAP_I2C help This driver supports the Invensense MPU6050/9150, - MPU6500/6515/9250/9255, ICM20608 and ICM20602 motion tracking devices - over I2C. + MPU6500/6515/9250/9255, ICM20608/20609/20689 and ICM20602 + motion tracking devices over I2C. This driver can be built as a module. The module will be called inv-mpu6050-i2c. @@ -28,7 +28,7 @@ config INV_MPU6050_SPI select REGMAP_SPI help This driver supports the Invensense MPU6000, - MPU6500/6515/9250/9255, ICM20608 and ICM20602 motion tracking devices - over SPI. + MPU6500/6515/9250/9255, ICM20608/20609/20689 and ICM20602 + motion tracking devices over SPI. This driver can be built as a module. The module will be called inv-mpu6050-spi. diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 5096fc49012d..5fd57a1bee90 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -176,6 +176,22 @@ static const struct inv_mpu6050_hw hw_info[] = { .fifo_size = 512, .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, }, + { + .whoami = INV_ICM20609_WHOAMI_VALUE, + .name = "ICM20609", + .reg = ®_set_6500, + .config = &chip_config_6050, + .fifo_size = 4 * 1024, + .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, + }, + { + .whoami = INV_ICM20689_WHOAMI_VALUE, + .name = "ICM20689", + .reg = ®_set_6500, + .config = &chip_config_6050, + .fifo_size = 4 * 1024, + .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, + }, { .whoami = INV_ICM20602_WHOAMI_VALUE, .name = "ICM20602", @@ -286,20 +302,22 @@ static int inv_mpu6050_set_lpf_regs(struct inv_mpu6050_state *st, if (result) return result; + /* set accel lpf */ switch (st->chip_type) { case INV_MPU6050: case INV_MPU6000: case INV_MPU9150: /* old chips, nothing to do */ - result = 0; + return 0; + case INV_ICM20689: + /* set FIFO size to maximum value */ + val |= INV_ICM20689_BITS_FIFO_SIZE_MAX; break; default: - /* set accel lpf */ - result = regmap_write(st->map, st->reg->accel_lpf, val); break; } - return result; + return regmap_write(st->map, st->reg->accel_lpf, val); } /** diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index f47a28b4be23..c2b5621edadb 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c @@ -74,6 +74,8 @@ static bool inv_mpu_i2c_aux_bus(struct device *dev) switch (st->chip_type) { case INV_ICM20608: + case INV_ICM20609: + case INV_ICM20689: case INV_ICM20602: /* no i2c auxiliary bus on the chip */ return false; @@ -218,6 +220,8 @@ static const struct i2c_device_id inv_mpu_id[] = { {"mpu9250", INV_MPU9250}, {"mpu9255", INV_MPU9255}, {"icm20608", INV_ICM20608}, + {"icm20609", INV_ICM20609}, + {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, {} }; @@ -253,6 +257,14 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20608", .data = (void *)INV_ICM20608 }, + { + .compatible = "invensense,icm20609", + .data = (void *)INV_ICM20609 + }, + { + .compatible = "invensense,icm20689", + .data = (void *)INV_ICM20689 + }, { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index 6158fca7f70e..75b8903450eb 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -75,6 +75,8 @@ enum inv_devices { INV_MPU9250, INV_MPU9255, INV_ICM20608, + INV_ICM20609, + INV_ICM20689, INV_ICM20602, INV_NUM_PARTS }; @@ -276,6 +278,7 @@ struct inv_mpu6050_state { /* mpu6500 registers */ #define INV_MPU6500_REG_ACCEL_CONFIG_2 0x1D +#define INV_ICM20689_BITS_FIFO_SIZE_MAX 0xC0 #define INV_MPU6500_REG_ACCEL_OFFSET 0x77 /* delay time in milliseconds */ @@ -340,6 +343,8 @@ struct inv_mpu6050_state { #define INV_MPU9255_WHOAMI_VALUE 0x73 #define INV_MPU6515_WHOAMI_VALUE 0x74 #define INV_ICM20608_WHOAMI_VALUE 0xAF +#define INV_ICM20609_WHOAMI_VALUE 0xA6 +#define INV_ICM20689_WHOAMI_VALUE 0x98 #define INV_ICM20602_WHOAMI_VALUE 0x12 /* scan element definition for generic MPU6xxx devices */ diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index f7276f9d83fc..189df8bae7b4 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -78,6 +78,8 @@ static const struct spi_device_id inv_mpu_id[] = { {"mpu9250", INV_MPU9250}, {"mpu9255", INV_MPU9255}, {"icm20608", INV_ICM20608}, + {"icm20609", INV_ICM20609}, + {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, {} }; @@ -109,6 +111,14 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20608", .data = (void *)INV_ICM20608 }, + { + .compatible = "invensense,icm20609", + .data = (void *)INV_ICM20609 + }, + { + .compatible = "invensense,icm20689", + .data = (void *)INV_ICM20689 + }, { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 From patchwork Mon Jan 20 09:36:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341593 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29667924 for ; Mon, 20 Jan 2020 09:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EDD2C208CD for ; Mon, 20 Jan 2020 09:37:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="IQcAIT/5"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="bSprz5ku" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgATJhN (ORCPT ); Mon, 20 Jan 2020 04:37:13 -0500 Received: from mx0a-00328301.pphosted.com ([148.163.145.46]:20370 "EHLO mx0a-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbgATJhN (ORCPT ); Mon, 20 Jan 2020 04:37:13 -0500 Received: from pps.filterd (m0156134.ppops.net [127.0.0.1]) by mx0a-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9Tq6S007127; Mon, 20 Jan 2020 01:36:59 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=SiWIoTxyDbzRIsUM2KYgSmOydCXzhJ2aoO2pC6/MFxo=; b=IQcAIT/5ibfYLch/J5OPdrvZalJPK2tlGclFhEDE5z/PqdDB1C5x3xpwokXneQQy24o1 AryFccxR2zkDbuLV4Pmyb/LJg4XLV58FLKItvAslsz7DaLWaX6hMm2C0cYV71HRgudSl 1tW3Yif+Ve3YKcQ6floBBFDnt4g7EWUjKSdnEFI/8oA5JcvB9rgujCQRAIe6FDRbcZpT Airbl5MJNWTQGBT8wjm/9vH+zXkYLNgiPgdRQhxlu2N7I40E2h5HLWqs697bnM3JzjUH oo/ClDGrRTSfMCe74OmiWOhXj1C6J2RxtNhiPWfYfJVYFuOCAiW8gJD7XINRksYxV7mi Fg== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by mx0a-00328301.pphosted.com with ESMTP id 2xm1gqrmt6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:36:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M6KWQrYJ7T3zgibxuztb1rMLzyeCL9gESsT5vRO/E9EgI/ySLllM7XDO5S3+6cEgcq98TIH2NJ5/AOhWa4niXJSDP0Ac9D4JZGMhRTHJxEqAt8XeEm/oEe9Q6fNhXheZvIJkIhCBdTG+oCOSb7oLnSVjV2jfekN9FozPzzcn5cZTAZ5CwyaDsUArbNsWjTR/6AYpGRjeKz2uNhsBBi6jb22SuSIBhZ4wXUqEMUdo+b0BYn1gmLjDiaUG5gFaU7AulV8cr/oLcooMEe/OM/Is2p8xfY0fu2f1z1BJQDIhr1LXnX++gcdqL5YgqFMDhIFJg1L37G0PWvhUjStrvGfy9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SiWIoTxyDbzRIsUM2KYgSmOydCXzhJ2aoO2pC6/MFxo=; b=lqRf6TG3yz/umLblWyLw8hTQC0yijtbkZy0K2InboLr5RuzmxJ5wl+uNyCtQhYFomNOnGt7pZsMk61W4TNwmvZkRI9FenKmzlj9BDl1FFMO2j+OC+s1LH44vcZXQ6WStf/Y5MKzf1fHu0o6yi7p7NtCeDGKtssMjn1VB/Q34uX8hwEo2V7WuiP19/QF9PA9zvNQYEb2pSP2PIsV5vBW3fkcLl5Hu0c0NKRtmPzBRbTqldhKB2tJFUTOmZjVqtVvdQQh714C7VUTIVzLLuwBiAYhn7VN+I3DbUakHJXt9NvsRy/0/2/EjOFufTqYMvws69BHgMRHVJ524vL4NDvLrog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SiWIoTxyDbzRIsUM2KYgSmOydCXzhJ2aoO2pC6/MFxo=; b=bSprz5kuzUxb2YBH+OarIeNQI2AwfFYIy7sm5jOeorNjhkMeJaWgCodsxbrEPj+JpxcBKhRY26Fyt3rpkOu2KrsuLl820+bj2uSxkuQStYAiw8jazkm9QJm+iWv3vJmzuzkrr68wxfOeg/q/TvzqxRAgu1UT7oZcyhXCXhWPSsc= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:36:55 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:36:55 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 4/9] dt-bindings: add description for icm20609 and icm20689 Date: Mon, 20 Jan 2020 10:36:15 +0100 Message-Id: <20200120093620.9681-5-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:52 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28b53587-c0bf-45ee-572a-08d79d8c496c X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(4744005)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ouRueZZEwcjXOtlyHhCoHD6jBoG+LHJuKJi0rAGS17DQND3ghePHZkT99PYEPz6rUbN3jqb0LkGS2Qdq7OI5PPDlhVO0gWKh7HZvK5zXBhA387p95K8JgZEyjNR4PMHtZlM6og+/iAvv32YWr6XpUWgb1WrA5Zr+F+VqtAlIghxYgZr0oFsvzkQV4UaIijNjWIx4G3aixBZyn8VhoBhCiVd9RM+nvnm9aRFPUSkh7z0DDMa8JXQ1nxcB8cU/e4O8xRsWQvi8nHQuIn3FCDenMxXVnnCCLCRd7AzYlH68stKh1ZwB70Tads1LTxqZj/yOZQWpLqiaCKW8Zhg/hc8nakWgsl8e0tnxDZ1TzjwIKuRl1yPQmAdmpXa6c/KAfQ5CqqcXqGCKIcol3WITJfiWzmMqI+p+RGhY8/5lTE2KuUVeVaETnVZwO8UZ5w9Xlb/F X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28b53587-c0bf-45ee-572a-08d79d8c496c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:36:55.2331 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2ox57PslQuMkEvHMPXGfVh7YyvSpQ2MKG1AvPL8M4UOITlwCWvE5H2Z08sj2AAs4g1rm5ALnStMYmGFhVvPMgaI4bf79j5d+eNDFAMoNDp8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=656 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org New supported chips. Signed-off-by: Jean-Baptiste Maneyrol --- Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt index 38483ea31fd4..606daa145975 100644 --- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt +++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt @@ -12,6 +12,8 @@ Required properties: "invensense,mpu9250" "invensense,mpu9255" "invensense,icm20608" + "invensense,icm20609" + "invensense,icm20689" "invensense,icm20602" - reg : the I2C address of the sensor - interrupts: interrupt mapping for IRQ. It should be configured with flags From patchwork Mon Jan 20 09:36:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341589 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD927921 for ; Mon, 20 Jan 2020 09:37:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87AF42087F for ; Mon, 20 Jan 2020 09:37:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="hHTR+aWp"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="QjIUtftP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbgATJhF (ORCPT ); Mon, 20 Jan 2020 04:37:05 -0500 Received: from mx0a-00328301.pphosted.com ([148.163.145.46]:14180 "EHLO mx0a-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgATJhE (ORCPT ); Mon, 20 Jan 2020 04:37:04 -0500 Received: from pps.filterd (m0156134.ppops.net [127.0.0.1]) by mx0a-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9Tq6T007127; Mon, 20 Jan 2020 01:37:00 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=q/wWUx6BfE9XfiWkGIu56PHDOTmVjW++RZg/ACURu1w=; b=hHTR+aWp91HioMFv/lBUj1nmRNM9wtjkL8vIMX0Bhk1l8OnEiljD3qyM6wi5APiy58wP 7WI7nGpRAngKbVpzhX9uK/3Q+5o84b77pcYca2DUIpAFMmDNGlWF93in3v9Ivfp/r5ew 48QoWHZxm5YNkeuCYg3pRGlOz+OcHGa2Op3E2b+3bng500vRIaYx7D7tK48xfNzkdYXf Pw/GQeK4+5FKKVwudquk/q28sfDw6vcgc0m+rlbNUXZLXpC1vd4uErcndh8D0hBiHvsL 4IbGVisUJtsA50JPYxpWChrLDm1f9xguWGEaWq61QPjFOhlCG/rykJKHMFYa21g0nSx5 bg== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by mx0a-00328301.pphosted.com with ESMTP id 2xm1gqrmt6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:37:00 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BORfg/oyjDzxOZ8eoPVjMBes1H1J94Yvcvmuc4S3L7BQYHhzJOXaADVspKMLoAkTHl6fYoBroXER02jpzUMUTAqTo5ZcnuDrbdz7z87Nsn2d7Efk2aKNQE2rRYAfh2tyqoLrBowsYKhP8BAesSBFVQS5WcIRH+SUZCIEbbj39j3ZHqv8/dgEpdmLG/zfc+1/dss50rsemsXKmDA+xi9BBjMmNPY4be3lVGsgH6jz7aW0saa58ZrJbd+Zu4rGE2K5xad/N/tBoDzc82GoAp0rwwjBqBSpzXq0XhdMu9L6ZYWOdyF4FwRhVVsp9PRrgIhQ9QS3Rl6NOs6KI8/BPR2sxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q/wWUx6BfE9XfiWkGIu56PHDOTmVjW++RZg/ACURu1w=; b=SOU8ca6CJMOUtEk9+VAAPRrOvKFKMTmKTSgGmHSk3iBK3e5p9fm3HqJk3VMgpgrGMMU6DYfbE1jRCWQPRTNyWKT3jaQsgUdwnbeI+qoHkqbRKH46YqNORIbcWgwQ8mUuBpEgEszxskxff6Q3Em6VO6X6ErN3/y8rzEcH743AUKhbBZL1YuP3kUlQSjJWLp++zr7TqTKLSUgryt+qptbjrDyZ/sElZHx1HTDEPVvnRUHKvw/6W7yFwYlgObLLKKTSNM0FNrsPq5qrdVT3wH6Fry+BSTZy6+8GmSpcTkvNk26mJlQv0wyOZxinuZjkWy+RQR7pcy00251lTot312woOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q/wWUx6BfE9XfiWkGIu56PHDOTmVjW++RZg/ACURu1w=; b=QjIUtftPZTIN6i3fpNWwRiLxLT0ZbUB0hc2nvmR1yZ0KOwOKuvh9HLXZB09flnO8FlrEBzDqxDuBXh4DQSTFYmyjqs+TdTlVkqAU0pucev0erY091aYf6G1wVYMUlKnmD+VGrYJ3v5WyVk2muQnfATvaDas/j8Jh4Qk0DGSQl8U= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:36:58 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:36:58 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 5/9] iio: imu: inv_mpu6050: add support of IAM20680 Date: Mon, 20 Jan 2020 10:36:16 +0100 Message-Id: <20200120093620.9681-6-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:55 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d8e2a1be-b6ff-4ebf-6325-08d79d8c4b0a X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tkMpoJnPSvEeQnxfjFcEZiB6rBVv6UudwZzDBIyKOauqHlaKu+MJAPJFx+X8ABnj5f4XZU8vzvM2D2Z41sT+0wDbqnzVqli+elOr1JJVUR8/GicLtsvVCek/J0yHO+49ddI3ntTPEDxt6Rdc34amAIaDg7AhMeMi/ri3Nz5KsuS4XqroQbrub4Y48df6JfGhSTwa8BgPm0C4LcbnRZ2OOAT1FPlwuu3w/mBNnk1mCSLGfWOFc6dCNoe5B9m75An93rXiGh13Ro62faE4uIK8TlzuRAwcrtDwtiTUPoZ1yEoi1TlKoFhtilGY8UNzkCjeMRUtriCzQFYKoh9tRNkci8GvSM3obMxuUpM8raoMXyAUUybZCorj/ahlEoAr9gC9zZPMNKMC465fFfIGN1U7dnR9ZuH3Y8bG6H6tFwtBLWP/XMpgby2jJ6+jkxCqSuq6 X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8e2a1be-b6ff-4ebf-6325-08d79d8c4b0a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:36:58.0136 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6JnphokRMc3FK23cP05evDu2n7QJY9wgv3gm+OOPHN1PbJjMnnwIWNptjUKvm19p2r+A1hSk3h2Bs93jk3jNvRhOsAPFr5XKbQdqLf8EF0w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Automotive certified IMU, similar to ICM20608. Signed-off-by: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_mpu6050/Kconfig | 4 ++-- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 8 ++++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 6 ++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 ++ drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 5 +++++ 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index e933db3a5a89..e65474a64675 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig @@ -16,7 +16,7 @@ config INV_MPU6050_I2C select REGMAP_I2C help This driver supports the Invensense MPU6050/9150, - MPU6500/6515/9250/9255, ICM20608/20609/20689 and ICM20602 + MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602 and IAM20680 motion tracking devices over I2C. This driver can be built as a module. The module will be called inv-mpu6050-i2c. @@ -28,7 +28,7 @@ config INV_MPU6050_SPI select REGMAP_SPI help This driver supports the Invensense MPU6000, - MPU6500/6515/9250/9255, ICM20608/20609/20689 and ICM20602 + MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602 and IAM20680 motion tracking devices over SPI. This driver can be built as a module. The module will be called inv-mpu6050-spi. diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 5fd57a1bee90..e8e6beef3f04 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -200,6 +200,14 @@ static const struct inv_mpu6050_hw hw_info[] = { .fifo_size = 1008, .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, }, + { + .whoami = INV_IAM20680_WHOAMI_VALUE, + .name = "IAM20680", + .reg = ®_set_6500, + .config = &chip_config_6050, + .fifo_size = 512, + .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, + }, }; int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index c2b5621edadb..66193786386c 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c @@ -77,6 +77,7 @@ static bool inv_mpu_i2c_aux_bus(struct device *dev) case INV_ICM20609: case INV_ICM20689: case INV_ICM20602: + case INV_IAM20680: /* no i2c auxiliary bus on the chip */ return false; case INV_MPU9150: @@ -223,6 +224,7 @@ static const struct i2c_device_id inv_mpu_id[] = { {"icm20609", INV_ICM20609}, {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, + {"iam20680", INV_IAM20680}, {} }; @@ -269,6 +271,10 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 }, + { + .compatible = "invensense,iam20680", + .data = (void *)INV_IAM20680 + }, { } }; MODULE_DEVICE_TABLE(of, inv_of_match); diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index 75b8903450eb..404c289f8c84 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -78,6 +78,7 @@ enum inv_devices { INV_ICM20609, INV_ICM20689, INV_ICM20602, + INV_IAM20680, INV_NUM_PARTS }; @@ -346,6 +347,7 @@ struct inv_mpu6050_state { #define INV_ICM20609_WHOAMI_VALUE 0xA6 #define INV_ICM20689_WHOAMI_VALUE 0x98 #define INV_ICM20602_WHOAMI_VALUE 0x12 +#define INV_IAM20680_WHOAMI_VALUE 0xA9 /* scan element definition for generic MPU6xxx devices */ enum inv_mpu6050_scan { diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index 189df8bae7b4..e911e13edb86 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -81,6 +81,7 @@ static const struct spi_device_id inv_mpu_id[] = { {"icm20609", INV_ICM20609}, {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, + {"iam20680", INV_IAM20680}, {} }; @@ -123,6 +124,10 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 }, + { + .compatible = "invensense,iam20680", + .data = (void *)INV_IAM20680 + }, { } }; MODULE_DEVICE_TABLE(of, inv_of_match); From patchwork Mon Jan 20 09:36:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF0E113A4 for ; Mon, 20 Jan 2020 09:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B360C207FF for ; Mon, 20 Jan 2020 09:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="UWnDo/kp"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="LX+IkQvu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726607AbgATJrk (ORCPT ); Mon, 20 Jan 2020 04:47:40 -0500 Received: from mx0b-00328301.pphosted.com ([148.163.141.47]:33686 "EHLO mx0b-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbgATJrk (ORCPT ); Mon, 20 Jan 2020 04:47:40 -0500 Received: from pps.filterd (m0156136.ppops.net [127.0.0.1]) by mx0b-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9SwM5025978; Mon, 20 Jan 2020 01:37:04 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=vLQTJETV/5icW+gIXrvxlzritXE+3qPJ+7/Afb6p9z8=; b=UWnDo/kpxFVIYSB3CX8TJ3jRMJkZptwWreURoT5HZhzfvTgRqUpS/M/WpxOzeOpDMn1S HLfF8SaCwea4k6DEe6cAD+ryUDxwk9dJZncIFFUlOaRTw+FWvfDfKuWzFEMWxEE4CLph 6e+uvoZf8JrtVaWxkAGpQnjqQHu5WqDztrcSL2hf9oILeVZFAgwTtvqcaw/WSBerf3YI aahVzHiqOm9lvV9CyNaaEPy2nnqczIEXXKOA4aeOztIgUirUrTBewsa2D6RubSWEhRCc /ynifcHuegVynFzkcoDCte2+pJPuYOrbwubdOqlMURVqjQLFjXIkT3a6BC3F4tw9fTMf UA== Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0b-00328301.pphosted.com with ESMTP id 2xkxuu0mxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:37:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ExOH+MUxy51NKMfq6lGlR8e70FcVfOdGNwzQqD6Pef4flp0el4DTGGE1ZsKf+WFrWUiD9WDZdyuJ3JNEcxsyTC0oVEj2pIK3rdK/fZ5dHPMW3K7xfodkEJXVsh5JDoQuMBaiDfuMK02+czny/0KgCAsVUUS35DKZOoCG1XTAh6ZT31JRkNMWtOf1u8XqW0rJlFvXwCckMoCNZvAx6z7K9Or5jixPcujLw0eqsaRIYyab22fkFjOQ6ZsBf9N8/E+pm93C0y3FRKcZP8lW6wGbJIVqi+9O2hpDWC/ZrYl8cEWf+X9yZ4Oxoo3OcOu6Ha3UEhpP4R6lR9Dgyc8GN8VjCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vLQTJETV/5icW+gIXrvxlzritXE+3qPJ+7/Afb6p9z8=; b=ES3QJ2GAB1za8t5qWZLpO6BC0TlPtm4eRWAWaTQWvmDLJZ0kJRjVhj0chEwgQml6SvFa2EalNuMrRJ4QbWx3Vnu9+9GB3GP4H0xbe0RN/vD2kk0mrfDGaIpPoiKkZCxEnc3z80BCfVfDeo6TfXBRjX2kE8y8tz5IKm77D0XxpIXGXz/fA+oJqpbJaAUjpzRE/+G3+zMhx0+pDCIY3Q6RAoVCKGbfSwXJeKJyAato0kt0gSNj+3KfSFaQYDXCQok933nEoHFaT3waRnJh13GQIdB019iGFONUbci+g+c2KkA/k5eZrtcv+QaQdMVV98HIJrXzvGmcHf1hRUIQEXUNkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vLQTJETV/5icW+gIXrvxlzritXE+3qPJ+7/Afb6p9z8=; b=LX+IkQvuJhitgUh5Z94TFSuT+K+/9vGCyLZFH01DLBf3iznaKYoMBf+R7d6wjJlyOMarlwbySQ46oxJdMRsImwSxejrgpjxkr2iHayNaw35RWKiRMUC2XvgFigEYaQmedRdyPHoionNNaEg2+zw5DlTNY5wNwG0rl8arR4o8Edk= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:37:00 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:37:00 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 6/9] dt-bindings: add description for iam20680 Date: Mon, 20 Jan 2020 10:36:17 +0100 Message-Id: <20200120093620.9681-7-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:36:58 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4226cfd0-b27f-40c7-025c-08d79d8c4cad X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(4744005)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGs/wA4BoXlS2t6v3dylZaqFPuQX3WKrAv1RQMK5FhzlKQi6IzDzzKjP1xoTn8y0u20lEE+O1ZDQpWtYmWAyh7aoDXJgaa98aBeYkxd90CvvkLbWFDwoFb8EBeXg9U3rkc4F2KBME5snvsL+/7Y3Xi34dC/lOswWEkQ6hJclVgJsVKzeodrx4lT2hg6d+/OQ3PlrbOK4ccPpr9vl/NDNdH1RFU2/XBtA8z30BYVzmKRSzmwXPuh9deePU9CEN+YuP9s4p1ivCLY1gxTVOvYjiKkQSng6+8v096cATZ+a5JZoHbEhjG3h2zwFqxS0Oli/hOLWfD9yA2dMDAKbG2d/xGfmQcOy4mJpkS2S1/HWRKck0d8w8cavQKHOUmxGMgg/e5p97pfHfnQa6OTKV+742eqQiCpDde/NvEIxbjTib4P0wzuB14jRenZJ7sULjfpa X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4226cfd0-b27f-40c7-025c-08d79d8c4cad X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:37:00.7351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ld2e4ZhKTP1Er04eVmsOoqdcNmc1ZTABsaWoIYyeAxI95S0xoW4bvQF4fcS83fcZP8/gBm8WrSLIcx4GjmRLjQvzpg1EfSY7H+cJ8h4ivP8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=732 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org New supported chip. Signed-off-by: Jean-Baptiste Maneyrol --- Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt index 606daa145975..29cec46e27ec 100644 --- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt +++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt @@ -15,6 +15,7 @@ Required properties: "invensense,icm20609" "invensense,icm20689" "invensense,icm20602" + "invensense,iam20680" - reg : the I2C address of the sensor - interrupts: interrupt mapping for IRQ. It should be configured with flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or From patchwork Mon Jan 20 09:36:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341609 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC90C13A4 for ; Mon, 20 Jan 2020 09:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87127207FF for ; Mon, 20 Jan 2020 09:47:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="QcioyUoy"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="MIgif4lo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbgATJrl (ORCPT ); Mon, 20 Jan 2020 04:47:41 -0500 Received: from mx0b-00328301.pphosted.com ([148.163.141.47]:33684 "EHLO mx0b-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgATJrk (ORCPT ); Mon, 20 Jan 2020 04:47:40 -0500 Received: from pps.filterd (m0156136.ppops.net [127.0.0.1]) by mx0b-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9SwM6025978; Mon, 20 Jan 2020 01:37:05 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=7OmZlTzr2NeP8b2xAXii26d+pFPKpTZpiadtyKbTsEc=; b=QcioyUoy3J6BxcdncEEXYU1mvkQpODWbHBw0DChTULol4BwFaTC8nkUHXXjMj9Mdbvm7 ZLCNtPDdBLVam1LLZrUzerZ2UCWEK0pkoyKJdsZxwU46S6fhWFNC5ha07B+Bkq4+MCmY dGVY+lxZnP/T9uhUJ7C67K4Hiao6r+D0oRC4IpdYjuyfHBBYHMzOW8huLG6ROyQ4Z97z v3LNwzkSJLl0x/nXUz7XesFFzWjcJqS/Wc1V5RW3OUKRdRv0yzuqLAW81sVDWJFv8luW /XnCSCG4yNW2+Dd//GfdDweXh3NYo3ytMETmPW6oXTaxQHAwv0dEZhXlpyuGcMuVozHj vQ== Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0b-00328301.pphosted.com with ESMTP id 2xkxuu0mxf-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:37:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IFvPQ0f7DH6WjbfE+7SpwDKwiTd5P9cO6J6B0iKo7qwueDWgHu1ODdwE/EAFIypY3rkmC7rud1oLXyujP3TNi2w3WZVuFDUCOKOCyHvJMhOd6InVFZ6ukt4uXkJ2GvjA1DBAXs96g82Xzk8bLnzKKxf1/MH8MymNOtqaX7piCsHo0kow5hh7jpEAEwfIWOsrlFcKtHuzbXEaUr0HIg1Luc6ILC7Iw71xOH48bwhFvuYJYTCtpURnEo5U4tl17gBXJB0txWw9oIski1InILLB8ezgFEhp4nl2yvQJuZg6MCmx/7+6+woxK+6EB/bI+FTXITZHDDkD3YsL8OQCO/180A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7OmZlTzr2NeP8b2xAXii26d+pFPKpTZpiadtyKbTsEc=; b=KV1i+fSkfyyeNQc0S8Dfbbt0D7LzYr0thIJXZhvk9adEmWw1Y0J1/djUUh6Td0Os9N8E12gUyCSzguBUOcS1Wbq0BjhXwNOHlvrjYH7KYTbAQvjS1AYt3VUo5pk4msag+rhK0u1W02URwVXhn2qJQrD5IvSv6CMg3WsMmLRJnFVihUQD7ya4I8X7T10A448gwlvxLVwCF7GnuqZa+FCiL82kMJ/qMTta53ca6stbTy0+mEyMDvGRfC1gGhBWN4DBKKjBsMclF4J4oR4Fad8iyDLz6F5GmmfkvgCDf/n4T3foTg2P8dEJBQSUz2ATk+EV76J94nwbC5vfuB/HD3BI+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7OmZlTzr2NeP8b2xAXii26d+pFPKpTZpiadtyKbTsEc=; b=MIgif4lopYko07Q9Fz1ljS5D3hAKFSD8CYfYE5Qwuz4OnA01m1TbQ2bgEsWDc5eoA1ex4Oj6PlDlLaz8pduJ+DB/ohjRKyVzXQsxQacnwQeJfjhOv6hIkhM4waxHG9zFNafcRv1ga8fURemHNgzhm+PYpPpaO4NzsnBtEH+wy/M= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:37:03 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:37:03 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 7/9] iio: imu: inv_mpu6050: add support of ICM20690 Date: Mon, 20 Jan 2020 10:36:18 +0100 Message-Id: <20200120093620.9681-8-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:37:01 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e8b423a-2452-434c-bbc3-08d79d8c4e4c X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +r/Wcs3suFErYBPsPvpskGLWX+b3rEiGz6I7Bqa4pM7HsuKUF5BOwI/kzZW0hkk872TBlh5coiDBd5K10z/1657Oun/b1Gd3VsAB9grUvcwl/mzYmbbIIUnCjzKRwCx3d9eEj7BEzg4jmUza+9bDBQDYiM+rE5EhxAbOO6WHP+OtW4PPmlSl5taK3bGVzGDjlg0ladV5EoDKC/WAyGGCD34bbgS+gd1IJSArwQbfEcnbmm+DRSJtPWknU7ZtrwNUnIkJyOASJKlGXhDDLZ9SKYllTA89p3xOp2y6C/NQkiV/Qg8hqBnz2YNUwb3XPwEYHwhQJTZH9C3VIoZmy/wZYGY4nWgiM9tV/Fj5YLQTJ6MvklmWPxJfL0/H89xkguqam+ixGuqijoSUjoApEQ2Q+SUkJQ9rV/qCahf9PszhqvKqiVoDNzoZ424oA51RklYp X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e8b423a-2452-434c-bbc3-08d79d8c4e4c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:37:03.5276 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K+EvRwufbBjLdZlKwxpLBmVQ5a2NWl+aAHJM/IHRmHi8Noi5lTKVO+3SnmNsDVFtnUxvkyCBD8VOvJ+FmO9uxkoNCIF4YzUDUuAhkPekbX4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Same generation as ICM20602 but different registers. Signed-off-by: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_mpu6050/Kconfig | 8 ++--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 36 +++++++++++++++++++--- drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 5 +++ drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 3 ++ drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 5 +++ 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index e65474a64675..7137ea6f25db 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig @@ -16,8 +16,8 @@ config INV_MPU6050_I2C select REGMAP_I2C help This driver supports the Invensense MPU6050/9150, - MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602 and IAM20680 - motion tracking devices over I2C. + MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602/ICM20690 and + IAM20680 motion tracking devices over I2C. This driver can be built as a module. The module will be called inv-mpu6050-i2c. @@ -28,7 +28,7 @@ config INV_MPU6050_SPI select REGMAP_SPI help This driver supports the Invensense MPU6000, - MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602 and IAM20680 - motion tracking devices over SPI. + MPU6500/6515/9250/9255, ICM20608/20609/20689, ICM20602/ICM20690 and + IAM20680 motion tracking devices over SPI. This driver can be built as a module. The module will be called inv-mpu6050-spi. diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index e8e6beef3f04..9ecc667debbe 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -200,6 +200,14 @@ static const struct inv_mpu6050_hw hw_info[] = { .fifo_size = 1008, .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, }, + { + .whoami = INV_ICM20690_WHOAMI_VALUE, + .name = "ICM20690", + .reg = ®_set_icm20602, + .config = &chip_config_6050, + .fifo_size = 1024, + .temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE}, + }, { .whoami = INV_IAM20680_WHOAMI_VALUE, .name = "IAM20680", @@ -295,6 +303,25 @@ int inv_mpu6050_set_power_itg(struct inv_mpu6050_state *st, bool power_on) } EXPORT_SYMBOL_GPL(inv_mpu6050_set_power_itg); +static int inv_mpu6050_set_gyro_fsr(struct inv_mpu6050_state *st, + enum inv_mpu6050_fsr_e val) +{ + unsigned int gyro_shift; + u8 data; + + switch (st->chip_type) { + case INV_ICM20690: + gyro_shift = INV_ICM20690_GYRO_CONFIG_FSR_SHIFT; + break; + default: + gyro_shift = INV_MPU6050_GYRO_CONFIG_FSR_SHIFT; + break; + } + + data = val << gyro_shift; + return regmap_write(st->map, st->reg->gyro_config, data); +} + /** * inv_mpu6050_set_lpf_regs() - set low pass filter registers, chip dependent * @@ -318,6 +345,7 @@ static int inv_mpu6050_set_lpf_regs(struct inv_mpu6050_state *st, /* old chips, nothing to do */ return 0; case INV_ICM20689: + case INV_ICM20690: /* set FIFO size to maximum value */ val |= INV_ICM20689_BITS_FIFO_SIZE_MAX; break; @@ -346,8 +374,8 @@ static int inv_mpu6050_init_config(struct iio_dev *indio_dev) result = inv_mpu6050_set_power_itg(st, true); if (result) return result; - d = (INV_MPU6050_FSR_2000DPS << INV_MPU6050_GYRO_CONFIG_FSR_SHIFT); - result = regmap_write(st->map, st->reg->gyro_config, d); + + result = inv_mpu6050_set_gyro_fsr(st, INV_MPU6050_FSR_2000DPS); if (result) goto error_power_off; @@ -559,12 +587,10 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev, static int inv_mpu6050_write_gyro_scale(struct inv_mpu6050_state *st, int val) { int result, i; - u8 d; for (i = 0; i < ARRAY_SIZE(gyro_scale_6050); ++i) { if (gyro_scale_6050[i] == val) { - d = (i << INV_MPU6050_GYRO_CONFIG_FSR_SHIFT); - result = regmap_write(st->map, st->reg->gyro_config, d); + result = inv_mpu6050_set_gyro_fsr(st, i); if (result) return result; diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index 66193786386c..f8b1fbca2d9e 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c @@ -224,6 +224,7 @@ static const struct i2c_device_id inv_mpu_id[] = { {"icm20609", INV_ICM20609}, {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, + {"icm20690", INV_ICM20690}, {"iam20680", INV_IAM20680}, {} }; @@ -271,6 +272,10 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 }, + { + .compatible = "invensense,icm20690", + .data = (void *)INV_ICM20690 + }, { .compatible = "invensense,iam20680", .data = (void *)INV_IAM20680 diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index 404c289f8c84..7ae614052210 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -78,6 +78,7 @@ enum inv_devices { INV_ICM20609, INV_ICM20689, INV_ICM20602, + INV_ICM20690, INV_IAM20680, INV_NUM_PARTS }; @@ -297,6 +298,7 @@ struct inv_mpu6050_state { #define INV_MPU6050_MAX_ACCL_FS_PARAM 3 #define INV_MPU6050_THREE_AXIS 3 #define INV_MPU6050_GYRO_CONFIG_FSR_SHIFT 3 +#define INV_ICM20690_GYRO_CONFIG_FSR_SHIFT 2 #define INV_MPU6050_ACCL_CONFIG_FSR_SHIFT 3 #define INV_MPU6500_TEMP_OFFSET 7011 @@ -347,6 +349,7 @@ struct inv_mpu6050_state { #define INV_ICM20609_WHOAMI_VALUE 0xA6 #define INV_ICM20689_WHOAMI_VALUE 0x98 #define INV_ICM20602_WHOAMI_VALUE 0x12 +#define INV_ICM20690_WHOAMI_VALUE 0x20 #define INV_IAM20680_WHOAMI_VALUE 0xA9 /* scan element definition for generic MPU6xxx devices */ diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index e911e13edb86..2d069e7d468b 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c @@ -81,6 +81,7 @@ static const struct spi_device_id inv_mpu_id[] = { {"icm20609", INV_ICM20609}, {"icm20689", INV_ICM20689}, {"icm20602", INV_ICM20602}, + {"icm20690", INV_ICM20690}, {"iam20680", INV_IAM20680}, {} }; @@ -124,6 +125,10 @@ static const struct of_device_id inv_of_match[] = { .compatible = "invensense,icm20602", .data = (void *)INV_ICM20602 }, + { + .compatible = "invensense,icm20690", + .data = (void *)INV_ICM20690 + }, { .compatible = "invensense,iam20680", .data = (void *)INV_IAM20680 From patchwork Mon Jan 20 09:36:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341591 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60515924 for ; Mon, 20 Jan 2020 09:37:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33747208CD for ; Mon, 20 Jan 2020 09:37:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="IGMSrBHd"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="Gv4F2ZIv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgATJhL (ORCPT ); Mon, 20 Jan 2020 04:37:11 -0500 Received: from mx0a-00328301.pphosted.com ([148.163.145.46]:19600 "EHLO mx0a-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbgATJhL (ORCPT ); Mon, 20 Jan 2020 04:37:11 -0500 Received: from pps.filterd (m0156134.ppops.net [127.0.0.1]) by mx0a-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9U2Wd008012; Mon, 20 Jan 2020 01:37:08 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=lxiXpkkAhk+dUrLv0lIopBcAtL+TlIQf+SgDzyovQD8=; b=IGMSrBHdOi89vhe0V1tNSD+6fJYOObSRmCoilafY9gw2yIwIt5D31pAACJLza1bDj3BU x2ZRTjaTkugOUDWWGjtYK6PXjrKfpP82YaO5kLj/zOpxk9s87lsfvVVQPj8F61awnagO ihgVp5p2YZNd5nbMnsnpqkB03lJ8z19rJHSPKEgElzRmPf8KRCfB6l1jo6c9fE675GYY /JlVuOreY+bO5dnrGbEHrbRBdnZjhtQye6WFA9gyS8Dr2Hyn6aQo35/j+30j7nMDHtBh gh+F4AfMA/SlOMxp+rWx1DqObnAoSg8cPJF+EwZ3bMzUCBMUAQty+/5ibBoIYVvlplx8 QA== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by mx0a-00328301.pphosted.com with ESMTP id 2xm1gqrmt9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:37:08 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZHqZm9XdEShRMOInWMda7fjlDS52psCjqksj2L4MWwmiVToiakzZBl0wjI7ZKtdZlTKMxwHVKs3PzmfhwQQhtsZM3SUjwDyRBRl+rlczniVCr6FXBEmYmgIcxiP2+wHwU1blbdAUsqVEeqpeLfAB63QdlKAc8jNmoeeeKenr22h3GC9Ccr9zMe0+YbCsddjYCLjI+zz2RfS4kKGhk+MdJg60tInsBsmIu2Xax9s0PvTJnrWCtj4yr5TSZkDmhEC0n2TOi6uceK4kCwbKDvhbnEuOtdFtjNEE5Kn0wM+tmiNaU0RI67Tdkp/FKDczLxS4/h1lxTcyO8tk2aI/fG5GuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lxiXpkkAhk+dUrLv0lIopBcAtL+TlIQf+SgDzyovQD8=; b=bLYkqgZzWzQAQRz2f+QkIkDiKv3D2MauHh9T2KfpTzPtUnApzNX2qMya0qE5rWNeYE6pT4j1RLVpqxyf0LnaYn4EgxonZBfplFKX7qC1uYccgjdSzjdUWSJFm9glYyFMzK4OYlJAgeZs8Ki5ZoxUHJCEJGwAZUSykPbyaa/FRAO1FFFUGAAYkTZG6S+0PK3cufFqT1jZtBnKWAOWbgE5FUwZtTVGRez4LAeaE0VSBEtVKBTdT5VvoffN/5N7oi0+loc8BzyD5r8Qy/bDEMaWS32KoZKNY3bBH2DotBZ3FHeO6V453ATW0i4kGYPr2e73cHAUyEYFh3zgfEBPZTIkkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lxiXpkkAhk+dUrLv0lIopBcAtL+TlIQf+SgDzyovQD8=; b=Gv4F2ZIv0/5sqJkuVbkl0qN1X0hlyNa0XF+wG5pUVqVWKvbeTGbBKzYHupfveTkCujnHsW+Tch4gLbY6vNZ6a2tgnWvQ4uMV8B6JZTzLARU5dhNGoZpghyS/Xj+iE5EjGjYd5zXoyNN25RNWaK5clH4g5V2Zho8omDezBx90l1A= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:37:06 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:37:06 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 8/9] dt-bindings: add description for icm20690 Date: Mon, 20 Jan 2020 10:36:19 +0100 Message-Id: <20200120093620.9681-9-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:37:03 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6417c2a-0e50-4b1e-fa66-08d79d8c4fff X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(4744005)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8pJdKgGeVG69RJp5DjKu45azaV9xvbh13YlVUsCpyl1ql7fQGBqRB7DQoY57GH29k5q7MvzPdGQpwLJqgm61jpOOZgGBar6vjNunKDBQRI5LaJjjuY437DIfV4XGrv72VHgwuMJfYzBwujkBadMxIxv+LpBYPZudv+lc0LgrWZi1DwxTOeU8lBGsVnvtqWhFmAwP+Cd6dUU7Hs7vN44P9IwAjUBHYbagh+3TOEpW3tURzWNheyFsIH2RtlYYnITt28GGUngN1Gr53hlyMx8rvr4vgaxT4bWxtNazZQPqoXnShAHCZ3uBSPY5pM1hQfHUOQiZv6DXF2c3/q0JOk2s+QrTA7LQ1ZyQYh9XVnMmT9jMkmyi4hSFM3Q++Oe3DAB8bIkC7zNtYlKFUAjiuymoMdtylvEBh6Kt3iX9LhToriL/Z5yoDJguEsRqlLdWU/H6 X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6417c2a-0e50-4b1e-fa66-08d79d8c4fff X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:37:06.2670 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: m8O8T04/og/gAyGOx5+NzQpvdqJjd8RQ5LdE2U9kRk65U2oeIH+MQvknE6aiQfagN/3d+4dmUqwUCu7uFtdmUvrCjVK3j00tiQ128KXtJQY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=723 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org New supported chip. Signed-off-by: Jean-Baptiste Maneyrol --- Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt index 29cec46e27ec..f2f64749e818 100644 --- a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt +++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt @@ -15,6 +15,7 @@ Required properties: "invensense,icm20609" "invensense,icm20689" "invensense,icm20602" + "invensense,icm20690" "invensense,iam20680" - reg : the I2C address of the sensor - interrupts: interrupt mapping for IRQ. It should be configured with flags From patchwork Mon Jan 20 09:36:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Maneyrol X-Patchwork-Id: 11341595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51DA1921 for ; Mon, 20 Jan 2020 09:37:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2558220882 for ; Mon, 20 Jan 2020 09:37:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=invensense.com header.i=@invensense.com header.b="cXQdVDZQ"; dkim=pass (1024-bit key) header.d=invensense.onmicrosoft.com header.i=@invensense.onmicrosoft.com header.b="A0YQk2hn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726775AbgATJhO (ORCPT ); Mon, 20 Jan 2020 04:37:14 -0500 Received: from mx0a-00328301.pphosted.com ([148.163.145.46]:21236 "EHLO mx0a-00328301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgATJhO (ORCPT ); Mon, 20 Jan 2020 04:37:14 -0500 Received: from pps.filterd (m0156134.ppops.net [127.0.0.1]) by mx0a-00328301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00K9Tq6V007127; Mon, 20 Jan 2020 01:37:10 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt1; bh=rh+zaW5OdyfhzfHfWg/qF2BHGMCgbuAeMW82swuobGI=; b=cXQdVDZQuvUaPBpqNpNJZzhs6qEJV8mIk7T6hpCf49zhFEDTBaqK4+qJk6PWUa8LbOG/ gLTvigwDr/R/mZAVlHBXncQ2Oc1W+sPgDj6ph0ytSWxztntYfH1BtTHoG9Zy2Mnx4jnI 0Fv0kXVZfYL/ii/1e6QITr4cuiLx0MwkDshVhUI+17tJWvF7ibCHorCIHkiuQG8Y4tXa bLcy516N49xOPDDXQJ0dzMNfAfP/8Hhy7b0agC/tugboqbrFDiiShXgudjUrJwRaNsj+ tF1fPuelQKFb02puplTS93YtEmzHWcUdjrVFKSH1vcWz2XLc7RaXfCQpHH0mt2SBl5Ct yw== Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by mx0a-00328301.pphosted.com with ESMTP id 2xm1gqrmtb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jan 2020 01:37:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RFYPzYBKHv9NNVIAYG3u3WvDpeSOF82acVVAwulf6FdragvJg2TGOtlSgETDOAAhv/MjwgOHuq1fLwDzRXzSIu92eDNOhGIiV8CjEwbpniGQuqVCE9qy9JRQwvuaiGnP9hkM2qhgfp7xyJotvxKmo4wLV5TQXmembJpEfVZupMtUb2CsOL+cWzYJdPOzkxeevplfz+Y0mVw4LzDr2fvTqlA66rPZZUCP11EslbBkUTnUt3TesEt2RgSAaCjayaqX6+aHinoC7wmGcwztFABkxzjBbO3EsQsCTGfU8tomYkAaLpYImXWG4Awl5Hl4yP0V/1ZB+XBBtWQfPDp3Qua+SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rh+zaW5OdyfhzfHfWg/qF2BHGMCgbuAeMW82swuobGI=; b=kjm5DiZsLWqDwoPMJD4G1d5T4G85QHySV40wWRtS4yniovA0SuPAWMhFuBdzibV7/uL/nA41br8pVZMMrZyOqkUUt6U5+xXkPcvJjNkAhRxXe6vyAAir9lkkGpsXdBNwWFZ360m8JSt787mEnxVjKJsy+bldnLobtMHv2XfnPuttW9gBSY8/z3ucvA8V/1mJBN74u0tjiuJq/UkrG7X27tkcZQbu9Ks4V4LpMziG19ttHZ416QN9t5oBrNcoG/3i7tGfP+uY61ZIxZQtFV9NIQAbszJRKc/3b5ASTGFI7QDCZQ6n/yQuSWgEM3vsaSedfK0aLWnoUUNqZxGW4+5I9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=invensense.com; dmarc=pass action=none header.from=invensense.com; dkim=pass header.d=invensense.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=invensense.onmicrosoft.com; s=selector2-invensense-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rh+zaW5OdyfhzfHfWg/qF2BHGMCgbuAeMW82swuobGI=; b=A0YQk2hnR8cHkVlwm3lx1ayqW+uvfiFSLCcqX6ILUKVG9go3vPtzmsbxaFEom0B5iBSdxcHDp2ECY5JctQbg85kIEGFVGFGO4tIFDKKw6Q8d7sMkhk3ThNJ3x3AbGIVjGVyGMl59Bk4ytza1CJFAI8+898RZXapuAsA7CkH+xwA= Received: from MN2PR12MB3373.namprd12.prod.outlook.com (20.178.242.33) by MN2PR12MB4048.namprd12.prod.outlook.com (52.135.49.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Mon, 20 Jan 2020 09:37:09 +0000 Received: from MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa]) by MN2PR12MB3373.namprd12.prod.outlook.com ([fe80::4028:892b:b405:59fa%6]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 09:37:09 +0000 From: Jean-Baptiste Maneyrol To: Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean-Baptiste Maneyrol Subject: [PATCH 9/9] iio: imu: inv_mpu6050: fix LPF bandwidth setting Date: Mon, 20 Jan 2020 10:36:20 +0100 Message-Id: <20200120093620.9681-10-jmaneyrol@invensense.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120093620.9681-1-jmaneyrol@invensense.com> References: <20200120093620.9681-1-jmaneyrol@invensense.com> X-ClientProxiedBy: LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) To MN2PR12MB3373.namprd12.prod.outlook.com (2603:10b6:208:c8::33) MIME-Version: 1.0 Received: from frgnb-12nlpn2.invcorp.invensense.com (77.157.193.39) by LO2P265CA0146.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Mon, 20 Jan 2020 09:37:06 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [77.157.193.39] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9645199c-f30f-4133-6994-08d79d8c51a6 X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0288CD37D9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(39840400004)(376002)(136003)(366004)(189003)(199004)(66946007)(66476007)(66556008)(7696005)(52116002)(86362001)(36756003)(107886003)(5660300002)(6666004)(2906002)(8676002)(81166006)(186003)(81156014)(54906003)(1076003)(8936002)(478600001)(4326008)(16526019)(316002)(956004)(2616005)(26005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4048;H:MN2PR12MB3373.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: invensense.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P17dr1aUavZcG3iaRTeH9Ew4beG27F1Va8pvp0KTwJKpKudSajfal43Pacn+ca9+Jpo3nMFJ/ZgJyfYM6PH6lKxumt/U5XdgxXEFRyro6aPHqIUQG6LIfSGZyAy58q0OF17UReTsKxOspkBl64aMQa3m1Cv5tWUbxh9TU4KM1OPvOAGtAUyh3DKuzE/j06Qeudjh26W5FooCX24EbczoSvQvBZt1Me2RWA19sN3MASrc/34JCQZhvoEujA3hDiVTH9iWN94SFKO4kduEOb01JIjXiJRtIoHaMJfaXqaLuFxjj/XbQff3o95tlrrassh4Q8qCJDbpQ8maQH8ZCaCIBt9mbQvAaW+PJY9kRvR6PjAJF1wcsTH/m1a6qvjbEW7eBlhThZPKiNLtKBUi12TyMwYSih5JcPKaepjL22BTNKud77cYYbniLWpIi9KDMAG1 X-OriginatorOrg: invensense.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9645199c-f30f-4133-6994-08d79d8c51a6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2020 09:37:08.9835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 462b3b3b-e42b-47ea-801a-f1581aac892d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DILJM+ag6JV905LRKR7vAY8W7xp7Mb8rUgvi49hyICny211zlF/GqHpZhlXU9pCBObWNzrdBtV9WTIfFHKinhlGaqeO7QkjqV8iRzadq4c8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_01:2020-01-16,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200083 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org As every chip has some little variant in LPF bandwidth values, use common values that are working for all chips. Simplify the LPF setting function. Signed-off-by: Jean-Baptiste Maneyrol --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 30 ++++++++++++---------- drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 10 ++++---- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 9ecc667debbe..c4db9086775c 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -707,30 +707,32 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev, /** * inv_mpu6050_set_lpf() - set low pass filer based on fifo rate. * - * Based on the Nyquist principle, the sampling rate must - * exceed twice of the bandwidth of the signal, or there - * would be alising. This function basically search for the - * correct low pass parameters based on the fifo rate, e.g, - * sampling frequency. + * Based on the Nyquist principle, the bandwidth of the low + * pass filter must not exceed the signal sampling rate divided + * by 2, or there would be aliasing. + * This function basically search for the correct low pass + * parameters based on the fifo rate, e.g, sampling frequency. * * lpf is set automatically when setting sampling rate to avoid any aliases. */ static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate) { - static const int hz[] = {188, 98, 42, 20, 10, 5}; + static const int hz[] = {400, 200, 90, 40, 20, 10}; static const int d[] = { - INV_MPU6050_FILTER_188HZ, INV_MPU6050_FILTER_98HZ, - INV_MPU6050_FILTER_42HZ, INV_MPU6050_FILTER_20HZ, + INV_MPU6050_FILTER_200HZ, INV_MPU6050_FILTER_100HZ, + INV_MPU6050_FILTER_45HZ, INV_MPU6050_FILTER_20HZ, INV_MPU6050_FILTER_10HZ, INV_MPU6050_FILTER_5HZ }; - int i, h, result; + int i, result; u8 data; - h = (rate >> 1); - i = 0; - while ((h < hz[i]) && (i < ARRAY_SIZE(d) - 1)) - i++; - data = d[i]; + data = INV_MPU6050_FILTER_5HZ; + for (i = 0; i < ARRAY_SIZE(hz); ++i) { + if (rate >= hz[i]) { + data = d[i]; + break; + } + } result = inv_mpu6050_set_lpf_regs(st, data); if (result) return result; diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index 7ae614052210..9a81098a8b4d 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -370,14 +370,14 @@ enum inv_mpu6050_scan { }; enum inv_mpu6050_filter_e { - INV_MPU6050_FILTER_256HZ_NOLPF2 = 0, - INV_MPU6050_FILTER_188HZ, - INV_MPU6050_FILTER_98HZ, - INV_MPU6050_FILTER_42HZ, + INV_MPU6050_FILTER_NOLPF2 = 0, + INV_MPU6050_FILTER_200HZ, + INV_MPU6050_FILTER_100HZ, + INV_MPU6050_FILTER_45HZ, INV_MPU6050_FILTER_20HZ, INV_MPU6050_FILTER_10HZ, INV_MPU6050_FILTER_5HZ, - INV_MPU6050_FILTER_2100HZ_NOLPF, + INV_MPU6050_FILTER_NOLPF, NUM_MPU6050_FILTER };