From patchwork Tue Jan 12 10:06:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 12013085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F33EC433DB for ; Tue, 12 Jan 2021 10:08:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFEBD23103 for ; Tue, 12 Jan 2021 10:08:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFEBD23103 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=nPh2mxyOe4cs+dkW8avdLT6iqwKkd1uBBIAc1Ye/IaI=; b=Dw1u83J64HQLW1HV3EPHVgqkRU XcponFUzli9XMh8oaIY8PkMV+tvWmAFntEbD2suMl4Ezlm8YOxdD6DLv2fNAEgNoThj1fjmWpojZO 3Dx3iA3Bk7/vURyGAxhoFNChr87BoP8LKOEP/yTklZMIgCcEkrpmkOHntGMZaQq4XqjbyPEYNtGOC rE8mVSuXwhMB+ozqu9qsiJaDnJ8ujHwuWWXMsBxQvOyLyVAKevj1AJJURrffm0l2FxtgHfp8yScy3 hoQ4AJ3s/hEXu+6qad3zrgQ1ERpG7n8QcpReSCpTFDqykyB8omIiAxIDumDC7V2lhjkpI31bcGE6r yoyAcp3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGa0-0005R1-9N; Tue, 12 Jan 2021 10:07:12 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGZv-0005Pc-UH; Tue, 12 Jan 2021 10:07:08 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 28AB923107; Tue, 12 Jan 2021 10:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610446026; bh=vdwmtnjiAMvviv26hOvbYr6Ik1Q7vOUq5UUucWiEegc=; h=From:To:Cc:Subject:Date:From; b=EdL2vLx3V3nkkoVBN39WY2dZbTEsYPI7oeFJd/yzffxDzveGK4Pq71jmTWpdGN98K ypzt/DPi8AkAYmHcyOR8Tz4Wmu5IBW5L4+V/PgXL3A4EdJeON8vq+3LyV1rQKxjmoW rjFkH274nXB8FGArd1sKLcfkVzjJFcURfchKqhDDzjhSvHQtGne19SG099O7YE88zP m2YhxHaQdzREhXVYlwkGvgtWLTU8W+qXjOFiLk86RfsaBSa+inZNPSBFw3ibTM9DHk X1Ks4jTEaI7IL/ZJ0yeShaemKro4DGilTDJPBciLV4jb8C+lU8PkhHjBRkDPbcYpN8 AEqJBDSWNPYgg== From: matthias.bgg@kernel.org To: Liam Girdwood , Mark Brown Subject: [PATCH v3 1/2] regulator: mt6358: Add OF match table Date: Tue, 12 Jan 2021 11:06:57 +0100 Message-Id: <20210112100659.19350-1-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_050708_079987_DC0AA6A2 X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gene Chen , Matthias Brugger , Axel Lin , Matti Vaittinen , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Chen Zhong , Hsin-Hsiung Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Matthias Brugger The binding documentation mentions that a compatible is required for the MT6358 device node. But the driver does not provide a OF match table. This way auto-loading is broken as the MFD driver that registers the device has a .of_compatible set which makes the platform .uevent callback report a OF modalias, but that's not in the module. Fixes: f67ff1bd58f0 ("regulator: mt6358: Add support for MT6358 regulator") Signed-off-by: Matthias Brugger --- Changes in v3: - drop mt6360 patch Changes in v2: - check for CONFIG_OF - add Fixes tag drivers/regulator/mt6358-regulator.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c index 13cb6ac9a892..a4ed19a54ec6 100644 --- a/drivers/regulator/mt6358-regulator.c +++ b/drivers/regulator/mt6358-regulator.c @@ -534,9 +534,18 @@ static const struct platform_device_id mt6358_platform_ids[] = { }; MODULE_DEVICE_TABLE(platform, mt6358_platform_ids); +#ifdef CONFIG_OF +static const struct of_device_id mt6358_of_match[] = { + { .compatible = "mediatek,mt6358-regulator", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, mt6358_of_match); +#endif + static struct platform_driver mt6358_regulator_driver = { .driver = { .name = "mt6358-regulator", + .of_match_table = of_match_ptr(mt6358_of_match), }, .probe = mt6358_regulator_probe, .id_table = mt6358_platform_ids, From patchwork Tue Jan 12 10:06:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 12013083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45E85C433E6 for ; Tue, 12 Jan 2021 10:08:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFE6022B30 for ; Tue, 12 Jan 2021 10:08:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFE6022B30 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0xHdB2D1thw9wcKYG8vVOxvH1+iyHEKrLIo21aO3V5o=; b=MuUbh2kvfZr8boP+lL8dLiOXa Rk0vUcyDYML8a4K382YL//e/+K9jRE1QGU0qaEyy4Y+0hcoywBfeIsaUX8d0Usa7PNs9htCp84VXU eJxBfxX/9mbuWsWX/r5jrlz9anQSbVsBVxi3gaD9aBWzB67ED0at4t+eQ8BcJJJHQ7ZdLcA7C4VeE W5wIAlLEr+ZM+dtMMEEqHjJsOXsCZM3RBNXIfC0RDb9BoTm1BBOV+JGqmGQkgqgFvgkUFHsRjuI6l kViJZRLut2ev3f9tOHniDy5YDw8bv1jN6VpRAXxRCXFCTWs2ArLfCll0Ws1R5hfDC5vTqfcCcGv9o lFkDuIVAQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGa7-0005Tl-BN; Tue, 12 Jan 2021 10:07:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGZz-0005RB-1R; Tue, 12 Jan 2021 10:07:12 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5DD922310A; Tue, 12 Jan 2021 10:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610446030; bh=DxYt+mYx8c0tVX8A42/mQ1TijaD2I/tH+KiF9B0oDhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l2tZgQRBulvlz77JQDqCufd/2c7muJOQyBYXhyu+Xi6oENnqG708IwFP7GRYhSsOc RvvuhRdGd5h/f/dH0TOhwNTIPw1Ls9Hi8EB2dPMmUDbHybon4wz4SMhjxVAtUx9012 I64JhOpJieRbsE8B7SbKhDBsEW14h5w+XM9EOrKUx/u+zaQj6M1wO+g2GQFL7B6Q1J YLMnhmS9M5JuBftwTYZIo+7gD1LS7YCcUpjgw4Hjur2I7374mZ8BpdnBx/lzH4sMED Wl8EOj4BTxjcHYiB59i0K5Yxb/xxQhr7WqF3/9VLJprLFk1V454e4keJWERROvDaFz 4kamh0By/fgGQ== From: matthias.bgg@kernel.org To: Liam Girdwood , Mark Brown Subject: [PATCH v3 2/2] regulator: mt6323: Add OF match table Date: Tue, 12 Jan 2021 11:06:58 +0100 Message-Id: <20210112100659.19350-2-matthias.bgg@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210112100659.19350-1-matthias.bgg@kernel.org> References: <20210112100659.19350-1-matthias.bgg@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_050711_251227_6568B980 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gene Chen , Matthias Brugger , Axel Lin , Matti Vaittinen , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, John Crispin , Matthias Brugger , Chen Zhong , Hsin-Hsiung Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Matthias Brugger The binding documentation mentions that a compatible is required for the MT6323 device node. But the driver does not provide a OF match table. This way auto-loading is broken as the MFD driver that registers the device has a .of_compatible set which makes the platform .uevent callback report a OF modalias, but that's not in the module. Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator") Signed-off-by: Matthias Brugger --- Changes in v3: None Changes in v2: - check for CONFIG_OF - add Fixes tag drivers/regulator/mt6323-regulator.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index ff9016170db3..646742d4db74 100644 --- a/drivers/regulator/mt6323-regulator.c +++ b/drivers/regulator/mt6323-regulator.c @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = { }; MODULE_DEVICE_TABLE(platform, mt6323_platform_ids); +#ifdef CONFIG_OF +static const struct of_device_id mt6323_of_match[] = { + { .compatible = "mediatek,mt6323-regulator", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, mt6323_of_match); +#endif + static struct platform_driver mt6323_regulator_driver = { .driver = { .name = "mt6323-regulator", + .of_match_table = of_match_ptr(mt6323_of_match), }, .probe = mt6323_regulator_probe, .id_table = mt6323_platform_ids,