From patchwork Fri Aug 22 23:03:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 4767491 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 9062A9F344 for ; Fri, 22 Aug 2014 23:06:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D91CB20172 for ; Fri, 22 Aug 2014 23:06:35 +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 1B4A520131 for ; Fri, 22 Aug 2014 23:06:35 +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 1XKxs0-0000Pr-SQ; Fri, 22 Aug 2014 23:03:44 +0000 Received: from cube.luon.net ([2a00:8240:5:10::20]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XKxrr-0000Mz-Mt for linux-arm-kernel@lists.infradead.org; Fri, 22 Aug 2014 23:03:36 +0000 Received: from localhost (localhost [127.0.0.1]) by cube.luon.net (Postfix) with ESMTP id BDE63E2C70; Sat, 23 Aug 2014 01:03:12 +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 UpQ9X0M82bs5; Sat, 23 Aug 2014 01:03:12 +0200 (CEST) Received: from dusk.luon.net (g111211.upc-g.chello.nl [80.57.111.211]) by cube.luon.net (Postfix) with ESMTPSA id 720E6E2C6A; Sat, 23 Aug 2014 01:03:12 +0200 (CEST) Received: by dusk.luon.net (Postfix, from userid 1000) id 271D2216D6; Sat, 23 Aug 2014 01:03:12 +0200 (CEST) From: Sjoerd Simons To: Doug Anderson , Lee Jones Subject: [PATCH 2/2] input: cros_ec_keyb: Add of match table Date: Sat, 23 Aug 2014 01:03:02 +0200 Message-Id: <1408748582-29029-3-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140822_160335_887579_76DD58FC X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Sjoerd Simons , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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=-2.6 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_keyb driver to be auto-loaded when build as 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/input/keyboard/cros_ec_keyb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 791781a..0bdbf2d 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -342,10 +342,20 @@ static int cros_ec_keyb_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume); +#ifdef CONFIG_OF +static const struct of_device_id cros_ec_keyb_of_match[] = { + { .compatible = "google,cros-ec-keyb" }, + {}, +}; +MODULE_DEVICE_TABLE(of, cros_ec_keyb_of_match); +#endif + + static struct platform_driver cros_ec_keyb_driver = { .probe = cros_ec_keyb_probe, .driver = { .name = "cros-ec-keyb", + .of_match_table = of_match_ptr (cros_ec_keyb_of_match), .pm = &cros_ec_keyb_pm_ops, }, };