Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2729391rdb; Wed, 4 Oct 2023 09:39:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5wCuTnhdnZEEqRqTNbIrRFoRq9/bojuk5R+n7Skx2D0suR98qGth3LOGujanH/uCWa++/ X-Received: by 2002:a05:6358:339e:b0:142:d1cb:48ab with SMTP id i30-20020a056358339e00b00142d1cb48abmr3237837rwd.15.1696437590619; Wed, 04 Oct 2023 09:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696437590; cv=none; d=google.com; s=arc-20160816; b=iLhP1Bb6/hHtLlSNsHIkGRliq/x9EItz1FMBe188WpvhqWTtHeEvkcR7wsoXEY5XMD 1PCxIuEFl89+jwDSlgQcDm+R15vgrVJbik0C+V2oIx+US0lZv55Hs2g1roMpyKQ1U7Br zSov4mzc5CHMYzG73TsXo+LyktQ3YRkkknFzHPsr07MJwVyR+t8QDiEHTn6NzTQzNi/S Pe3syYVZcWNwzBzDOlRdLajRrT5h4VzgM+NOiJX9vEYM7TgOhD21014IxIWcfz3zRVal oxKy6kHViXZyraqgexjjzjy5m8HJW469ns6wGewD412vKpsg8inykVt0hV0u16zMcGcc pE+g== 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.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e19-20020a656493000000b00578e5228c76si3865637pgv.505.2023.10.04.09.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:39:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; 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.34 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 howler.vger.email (Postfix) with ESMTP id 78D3F837318E; Wed, 4 Oct 2023 09:39:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243452AbjJDQjm (ORCPT + 99 others); Wed, 4 Oct 2023 12:39:42 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:39:46 -0700 (PDT) Add OF device table with compatible strings to allow automatic module loading. Signed-off-by: Luca Ceresoli --- 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, -- 2.34.1