From patchwork Tue Aug 26 07:47:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 4778711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D9F759F2A9 for ; Tue, 26 Aug 2014 07:50:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DF5320158 for ; Tue, 26 Aug 2014 07:50:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E45D20115 for ; Tue, 26 Aug 2014 07:50:33 +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 1XMBUz-0006m8-Km; Tue, 26 Aug 2014 07:49:01 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMBUv-0006bm-Rk for linux-arm-kernel@lists.infradead.org; Tue, 26 Aug 2014 07:48:59 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id D79D2600815 Received: by dusk.luon.net (Postfix, from userid 1000) id 514B920457; Tue, 26 Aug 2014 09:48:32 +0200 (CEST) From: Sjoerd Simons To: Doug Anderson , Lee Jones Subject: [PATCH 1/2] i2c: cros-ec-tunnel: Add of match table Date: Tue, 26 Aug 2014 09:47:50 +0200 Message-Id: <1409039271-10687-2-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409039271-10687-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1409039271-10687-1-git-send-email-sjoerd.simons@collabora.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140826_004858_080170_E59BE8A2 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: Sjoerd Simons , linux-samsung-soc@vger.kernel.org, Sergei Shtylyov , linux-arm-kernel@lists.infradead.org, Javier Martinez Canillas X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 To enable the cros-ec-tunnel driver to be auto-loaded when build as a module add an of match table (and export it) to match the modalias information passed on to userspace as the Cros EC MFD driver registers the MFD subdevices with an of_compatibility string. Signed-off-by: Sjoerd Simons Reviewed-by: Javier Martinez Canillas --- Changes in v2: Fix stray newline and indentation issues drivers/i2c/busses/i2c-cros-ec-tunnel.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c index 05e033c..0403ec1 100644 --- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c +++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c @@ -310,11 +310,20 @@ static int ec_i2c_remove(struct platform_device *dev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id cros_ec_i2c_of_match[] = { + { .compatible = "google,cros-ec-i2c-tunnel" }, + {}, +}; +MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match); +#endif + static struct platform_driver ec_i2c_tunnel_driver = { .probe = ec_i2c_probe, .remove = ec_i2c_remove, .driver = { .name = "cros-ec-i2c-tunnel", + .of_match_table = of_match_ptr(cros_ec_i2c_of_match), }, };