From patchwork Wed Oct 4 16:39:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 148418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp262058vqb; Wed, 4 Oct 2023 09:39:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHD0MtClFMZAcSXwyVENnU4mUShOtwElY8cYmViXIy6xa00fxRTV+znzmy/jFlRiyIKGnet X-Received: by 2002:a05:6808:8c7:b0:3ae:5650:c6cf with SMTP id k7-20020a05680808c700b003ae5650c6cfmr2916344oij.48.1696437584007; Wed, 04 Oct 2023 09:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696437583; cv=none; d=google.com; s=arc-20160816; b=NTYAS0gT/GeuTGquFmLw+HMQgRxZB5xD5B3Nabw2uG6qUtH5ZG+HFh5tgpRjbvYQFr Qx3VvUgmGgH+mBtKUi1gD4fNl5SF/ZC45sHAW1DouLXO1pJGOR3qMqtNY65RuQUBiCVw pGUQZaqC3u0OnWmRfenVD4PnNtki8cETmrzhTxrA+jm5bdbRUPFTT+GdbZ/mOAuNKdiX aM6yy1QrgTuL09jYGR2KiVJPy4IuFORrj1sTpadSe5Jkpgm6Og+v0s/3XR0hdtvfyV// eIBYZ+eDEq+lO5rCbiFccl6aaGADdakMC2P+DeYC35yfWEqcV/eDp4SIwRnZW9MOvDqQ gArg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=7f+ee0WdRWVkKBi7s0jg64td7knfr+0cjqvJ+YqfIIQ=; fh=j48Arg1mRKI0xhzqWGNPDYeXmZpdRTIOw6il6X14/Xs=; b=XXmyQTkhCNxAkzh9B7pNSInrcouJZXRaeEsRpfoiGIirGZTG8F5F0FOVb+zkZ6hag2 P9BMqjD6qCKDujC7kjF3BiG6ZEN/s+f1e8MyzpP7pcwfsdDRgTWGCSfQcOr18yGY2YF+ Blzmg2Xl1GuS8u/NUihzVxRpyqXMEaazJfZ8JneS41pSxoLpdiZCdnUF83IXSORjgnOs N0HphxY26NnctLXz/TZF5Klvw2k6qcaQOZVEA9PfKDdTKLpogaT+l05BU7Gl1N/fOxfr jMKSgjB/mxaZIw0QfGQ41oPJQxSCrFl9t82aG2zyca2j5lGb/jt4R0k5yGTAdb+b+6A1 v7Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YH3b4eeq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b128-20020a633486000000b005855424fc29si4191820pga.53.2023.10.04.09.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YH3b4eeq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 62D8482159D9; Wed, 4 Oct 2023 09:39:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243446AbjJDQjk (ORCPT + 19 others); Wed, 4 Oct 2023 12:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243439AbjJDQjj (ORCPT ); Wed, 4 Oct 2023 12:39:39 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252E3BF; Wed, 4 Oct 2023 09:39:32 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 069C524000B; Wed, 4 Oct 2023 16:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696437571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7f+ee0WdRWVkKBi7s0jg64td7knfr+0cjqvJ+YqfIIQ=; b=YH3b4eeqveJlwUqVwa+J5j5GsVCDs0k5HoffOuI38jtJ605lgY30Hq7Hcu8Hjqe3zPTBSq WQZnTqLZY//WbT/Eaa33sUTvcOrFOXyieYcdkmCteL/hwoNqEDbZY+pb9/+KMUVUZrSLsN v5JEmI7Was6Ez++g2xOURs3kX5iDjt3ZKXR6qCYDMWT8QxD05/aRv+lpI0fqZlfeeOmIRW mkwHiPC5sNLtdTt/1EJb4tdtueYpPemlYxgper1MK1tYQiGAL+MhqK6wWRnUMBDwvDMU+U yryn5ZjrVYwnma0HGhDsDVUC/EJ9BZCSGZ73bisSo0A/vCkaiOK7omYw/tkRFQ== From: Luca Ceresoli Date: Wed, 04 Oct 2023 18:39:27 +0200 Subject: [PATCH 1/2] dt-bindings: trivial-devices: Fix MEMSIC MXC4005 compatible string MIME-Version: 1.0 Message-Id: <20231004-mxc4005-device-tree-support-v1-1-e7c0faea72e4@bootlin.com> References: <20231004-mxc4005-device-tree-support-v1-0-e7c0faea72e4@bootlin.com> In-Reply-To: <20231004-mxc4005-device-tree-support-v1-0-e7c0faea72e4@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Jonathan Cameron , Lars-Peter Clausen Cc: Thomas Petazzoni , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.12.3 X-GND-Sasl: luca.ceresoli@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:39:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778843736273671696 X-GMAIL-MSGID: 1778843736273671696 The correct name of this chip is MXC4005, not MX4005. This is confirmed both by the manufacturer website and by the title of the original commit, which added other MXCxxxx devices as well but only this one misses a "c" in the compatible string. Signed-off-by: Luca Ceresoli Fixes: d9bf5d37fd58 ("dt-bindings:trivial-devices: Add memsic,mxc4005/mxc6255/mxc6655 entries") Reviewed-by: Krzysztof Kozlowski --- The original commit date being April 1st is possibly clarifying the origin of the issue! :) --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index cd58179ae337..430a814f64a5 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -232,7 +232,7 @@ properties: # MEMSIC magnetometer - memsic,mmc35240 # MEMSIC 3-axis accelerometer - - memsic,mx4005 + - memsic,mxc4005 # MEMSIC 2-axis 8-bit digital accelerometer - memsic,mxc6225 # MEMSIC 2-axis 8-bit digital accelerometer From patchwork Wed Oct 4 16:39:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 148419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp262065vqb; Wed, 4 Oct 2023 09:39:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjQ9YySNMBYFjO5ySp2yo67wAhDzkqGcS3HmLDiFLsppo/l3WGOF9qLKyw1uQwzoJdOh8x X-Received: by 2002:a05:6830:3d09:b0:6b7:5687:8a9e with SMTP id eu9-20020a0568303d0900b006b756878a9emr2832681otb.15.1696437584734; Wed, 04 Oct 2023 09:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696437584; cv=none; d=google.com; s=arc-20160816; b=wq3xi4QURVEt5lXihsKJ0meH44OWFUIDPYymhqJ2UjbpviXR7UtpoNrlLgqlxaFUWw g/SwBxojZDBZFp+6T5GWkPSxgxKzipksxwXGT58leVALKmq7coF8UNjLDQbM1bTLNopV CKW4FX+yIB822vLpdNqVU6QefMUYl4xci87w9NLNZZmrTuOziIQh8Gg/nq0vRUNgR/P9 jqkHKyf4VE03v1miYKQxBe6yz2V2viHE5Xo2gr8/4WYw56iitLiFha2MDNdGf/JbzxC0 +6PvaR9qBPHeK4Zxmxv5a0hsqQYhkF7vSaY4cr2Xm5YhpXD1hdgrfQpo/rwDePvwkzNF 9J7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=MoL7tK/sFHlVwmkaF58wS2KqlyZYUgDZWDR3PVlkupE=; fh=j48Arg1mRKI0xhzqWGNPDYeXmZpdRTIOw6il6X14/Xs=; b=DTJ2qFiPcmGF2db5+hubEeEyFSTDMpPuA+ikTfFP26igU26c0H1JVoStNjCmMHMGOl zKPJIxOkI+9+qI3k8qZeKI6ww1Bjg3KYk5CHHSFJQYTSOj1Fe6fV+wrxZz7CrV8T2s2u xlOmgCbayk8/T2/peWAVvwPESwhMkTiAHJBDt0+Eex3FybR+PwyTFIueiFTqluNoDGz9 ZDDzaphhs1MSJeBVFQAK5UTBtIZaa3Ms55U1WWvRftvxvzyZwrLNCyjXk/7banwPj+xN h0dCRcMe7v+K1oVxMfo8akdrfyZ2yw9YcIvOlQ3oddlo20DIXa9UEBHoxjmf98MgXMgK qjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EeIP1pmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y26-20020a637d1a000000b0058962af84easi335630pgc.135.2023.10.04.09.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EeIP1pmb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1442B82159E2; Wed, 4 Oct 2023 09:39:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243453AbjJDQjn (ORCPT + 19 others); Wed, 4 Oct 2023 12:39:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243442AbjJDQjj (ORCPT ); Wed, 4 Oct 2023 12:39:39 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE980C0; Wed, 4 Oct 2023 09:39:34 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id C8488240002; Wed, 4 Oct 2023 16:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696437573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MoL7tK/sFHlVwmkaF58wS2KqlyZYUgDZWDR3PVlkupE=; b=EeIP1pmbPB4UEYGgstYTh/lmdthejHe4/FFLflsZRL+bQMujIgkkiA5LkFtc1qnlK11wjZ n/THbQQkDOa88yXwfGKTa1fQbZKoHcze/VmgaCP/Rtw58Y9/3sTNbaM0Tooy6nn86su1F/ C4iNR3Vz/wB22JnadJdYpeOM4JhhON1crG3J6DMHaxBPIccUp5ToUBOrQf25bzwBhEflaH SD13HVFaWua+Futq9F5QRi8pe1/vHKBhFjKbsYm1Z3cuDI8fsLR46Sz2+RXc5BdAQf4SUN 2sVnc/1HqBgwg6kgMfpNTJn/AEUZIY1f8YCgvs4UtIELD9MQfMZyfO8d3bEnUQ== From: Luca Ceresoli Date: Wed, 04 Oct 2023 18:39:28 +0200 Subject: [PATCH 2/2] iio: accel: mxc4005: allow module autoloading via OF compatible MIME-Version: 1.0 Message-Id: <20231004-mxc4005-device-tree-support-v1-2-e7c0faea72e4@bootlin.com> References: <20231004-mxc4005-device-tree-support-v1-0-e7c0faea72e4@bootlin.com> In-Reply-To: <20231004-mxc4005-device-tree-support-v1-0-e7c0faea72e4@bootlin.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Jonathan Cameron , Lars-Peter Clausen Cc: Thomas Petazzoni , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.12.3 X-GND-Sasl: luca.ceresoli@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:39:44 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778843736758882063 X-GMAIL-MSGID: 1778843736758882063 Add OF device table with compatible strings to allow automatic module loading. Signed-off-by: Luca Ceresoli Reviewed-by: Krzysztof Kozlowski --- drivers/iio/accel/mxc4005.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c index 75d142bc14b4..41182531feb5 100644 --- a/drivers/iio/accel/mxc4005.c +++ b/drivers/iio/accel/mxc4005.c @@ -476,6 +476,13 @@ static const struct acpi_device_id mxc4005_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, mxc4005_acpi_match); +static const struct of_device_id mxc4005_of_match[] = { + { .compatible = "memsic,mxc4005", }, + { .compatible = "memsic,mxc6655", }, + {}, +}; +MODULE_DEVICE_TABLE(of, mxc4005_of_match); + static const struct i2c_device_id mxc4005_id[] = { {"mxc4005", 0}, {"mxc6655", 0}, @@ -487,6 +494,7 @@ static struct i2c_driver mxc4005_driver = { .driver = { .name = MXC4005_DRV_NAME, .acpi_match_table = ACPI_PTR(mxc4005_acpi_match), + .of_match_table = mxc4005_of_match, }, .probe = mxc4005_probe, .id_table = mxc4005_id,