From patchwork Fri Sep 19 08:08:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 4936351 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 27C52BEEA6 for ; Fri, 19 Sep 2014 08:10:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E50E201C8 for ; Fri, 19 Sep 2014 08:10:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69628201D3 for ; Fri, 19 Sep 2014 08:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbaISIKH (ORCPT ); Fri, 19 Sep 2014 04:10:07 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:41415 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbaISIKD (ORCPT ); Fri, 19 Sep 2014 04:10:03 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id 28C02609F5C Received: by dusk.luon.net (Postfix, from userid 1000) id 80010221F7; Fri, 19 Sep 2014 10:09:59 +0200 (CEST) From: Sjoerd Simons To: Lee Jones , Dmitry Torokhov , Wolfram Sang Cc: Doug Anderson , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-i2c@vger.kernel.org, linux-input@vger.kernel.org, Sjoerd Simons Subject: [PATCH 1/2 v2] i2c: cros-ec-tunnel: Add of match table Date: Fri, 19 Sep 2014 10:08:12 +0200 Message-Id: <1411114093-3505-2-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411114093-3505-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1411114093-3505-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=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: none 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), }, };