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: 13409036 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B2BEE7C4E6 for ; Wed, 4 Oct 2023 16:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243427AbjJDQjk (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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: 13409037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C7A5E7C4E5 for ; Wed, 4 Oct 2023 16:39:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243445AbjJDQjk (ORCPT ); Wed, 4 Oct 2023 12:39:40 -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 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org 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,