From patchwork Mon Jan 25 14:37:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 8109131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7AE07BF0A9 for ; Mon, 25 Jan 2016 14:39:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4C3220303 for ; Mon, 25 Jan 2016 14:39:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AB6C202E6 for ; Mon, 25 Jan 2016 14:39:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNiHd-0005x2-UV; Mon, 25 Jan 2016 14:38:21 +0000 Received: from lists.s-osg.org ([54.187.51.154]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNiHL-0005ss-Cz; Mon, 25 Jan 2016 14:38:04 +0000 Received: from sauron.localdomain (unknown [200.3.249.195]) by lists.s-osg.org (Postfix) with ESMTPSA id ED9CD4632A; Mon, 25 Jan 2016 06:37:40 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] regulator: mt6397: Add OF match table Date: Mon, 25 Jan 2016 11:37:16 -0300 Message-Id: <1453732637-20415-3-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453732637-20415-1-git-send-email-javier@osg.samsung.com> References: <1453732637-20415-1-git-send-email-javier@osg.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_063803_562243_5D61B395 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liam Girdwood , Javier Martinez Canillas , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, John Crispin MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Documentation/devicetree/bindings/regulator/mt6397-regulator.txt doc mentions that a compatible "mediatek,mt6397-regulator" is required for the MT6397 device node but the driver doesn't provide a OF match table so the platform bus .match fallbacks to match using the driver name instead. This also means that module auto-loading is broken for this driver since the MFD driver that register the device, has a .of_compatible set so the platform .uevent callback reports a OF modalias that's not in the module. Signed-off-by: Javier Martinez Canillas --- drivers/regulator/mt6397-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c index 585f0399a36b..17a5b6c2d6a9 100644 --- a/drivers/regulator/mt6397-regulator.c +++ b/drivers/regulator/mt6397-regulator.c @@ -323,9 +323,16 @@ static const struct platform_device_id mt6397_platform_ids[] = { }; MODULE_DEVICE_TABLE(platform, mt6397_platform_ids); +static const struct of_device_id mt6397_of_match[] = { + { .compatible = "mediatek,mt6397-regulator", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, mt6397_of_match); + static struct platform_driver mt6397_regulator_driver = { .driver = { .name = "mt6397-regulator", + .of_match_table = of_match_ptr(mt6397_of_match), }, .probe = mt6397_regulator_probe, .id_table = mt6397_platform_ids,