From patchwork Fri Aug 22 23:03:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 4767461 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F12E8C0338 for ; Fri, 22 Aug 2014 23:03:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF0F12013D for ; Fri, 22 Aug 2014 23:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFFA320131 for ; Fri, 22 Aug 2014 23:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbaHVXDO (ORCPT ); Fri, 22 Aug 2014 19:03:14 -0400 Received: from cube.luon.net ([37.72.100.20]:45496 "EHLO cube.luon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbaHVXDN (ORCPT ); Fri, 22 Aug 2014 19:03:13 -0400 Received: from localhost (localhost [127.0.0.1]) by cube.luon.net (Postfix) with ESMTP id 9BA3BE2C6F; Sat, 23 Aug 2014 01:03:11 +0200 (CEST) Received: from cube.luon.net ([127.0.0.1]) by localhost (cube.luon.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WsXp3fnElZ2T; Sat, 23 Aug 2014 01:03:11 +0200 (CEST) Received: from dusk.luon.net (g111211.upc-g.chello.nl [80.57.111.211]) by cube.luon.net (Postfix) with ESMTPSA id 5F681E2C6A; Sat, 23 Aug 2014 01:03:11 +0200 (CEST) Received: by dusk.luon.net (Postfix, from userid 1000) id 1493D216D6; Sat, 23 Aug 2014 01:03:11 +0200 (CEST) From: Sjoerd Simons To: Doug Anderson , Lee Jones Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Sjoerd Simons Subject: [PATCH 1/2] i2c: cros-ec-tunnel: Add of match table Date: Sat, 23 Aug 2014 01:03:01 +0200 Message-Id: <1408748582-29029-2-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1408748582-29029-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1408748582-29029-1-git-send-email-sjoerd.simons@collabora.co.uk> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 --- 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..3c15dcc 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), }, };