From patchwork Sat Feb 11 00:06:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9567645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB8C960573 for ; Sat, 11 Feb 2017 00:06:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A502A26CF9 for ; Sat, 11 Feb 2017 00:06:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97F4827FA3; Sat, 11 Feb 2017 00:06:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4564F26CF9 for ; Sat, 11 Feb 2017 00:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753348AbdBKAGd (ORCPT ); Fri, 10 Feb 2017 19:06:33 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34875 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbdBKAGb (ORCPT ); Fri, 10 Feb 2017 19:06:31 -0500 Received: by mail-pg0-f67.google.com with SMTP id 204so4141277pge.2; Fri, 10 Feb 2017 16:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Tn43qjbMQA4V6r/dtSWf1I3RUI7gs81D/VlkwhRV3OI=; b=Y1ZgifZTosTJDa1NCoASgkDhKXujTJEtmJCdepijJiIfNp4h5pInT5o63vOf99Fd4F eEoKihOs5VWBerEsW8Pb9Tk+JegIeEEpkUxaCE2kDYl1kYYYNdO82NfdFjXNWeurNFPZ gzl7gFQ0omxJjpi4i3MXNcKVIgWlyfnt7RntO4TSodwZ7t09Qsu9DVbabMR+pfTMF1V0 F5mJvaQfsbMMesJJqrZsEHcpuGJml57mSVsGegM9tcgUlb0FleuMZyaQTVIwcHohxomt uM1UPx3gXtHh5l2HL2+dZzeC4ztDOf18sPtWZTPhNX/WJWcqqvDmA5qnN3OM8hbEIHbn Cjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Tn43qjbMQA4V6r/dtSWf1I3RUI7gs81D/VlkwhRV3OI=; b=Y2U8zDvLFXOS6ts/kEI91q0fyJax6jwvHKPdiJcQoQeN6y4V+UpWBwZOcwf/scDcgf 7B1yA9IYLv7rXtzVs5+KGPrkxloKGfZW64VMAd85604EtQ7LxIcJFdr9N85tW/RiqLxC +GBT0pWIasGOuxkQMiGwNxaV4ZzOU5KaEYSZPGoCHZKAU7LEgts3GxyKGaq8zo0U6TFh x1erMxE9GIZW7u+wfG1UF8q2kttrV7n/fYI7aFn2lSnGXXz+Ef6egxLYmra2mZV4g1T/ uIZeohh+gCSe8DHQZE8p9fPbOLfKNL+tiV7ecaxH2WKRSC5LUsG9zEHP6hxf+ityulo7 w3bQ== X-Gm-Message-State: AMke39n5hRmiF3pjLCbhjOTnoVhnpFJBamn/e5FewCVl00cYfoNlBBBC9QQlAh4iW49ycg== X-Received: by 10.98.194.22 with SMTP id l22mr13220785pfg.178.1486771586049; Fri, 10 Feb 2017 16:06:26 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([172.22.152.34]) by smtp.gmail.com with ESMTPSA id 88sm7618592pfr.41.2017.02.10.16.06.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 16:06:25 -0800 (PST) From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Sebastian Reichel , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Michael Welling , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] Input: tsc2005 - add OF device table Date: Fri, 10 Feb 2017 16:06:21 -0800 Message-Id: <20170211000623.33663-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To be prepared for SPI module loading using full compatible strings from device tree, let's add OF module device table data. Signed-off-by: Dmitry Torokhov Reviewed-By: Sebastian Reichel --- drivers/input/touchscreen/tsc2005.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index f2c5f0e47f77..e02b69f40ad8 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -18,8 +18,9 @@ * GNU General Public License for more details. */ -#include #include +#include +#include #include #include #include "tsc200x-core.h" @@ -77,9 +78,18 @@ static int tsc2005_remove(struct spi_device *spi) return tsc200x_remove(&spi->dev); } +#ifdef CONFIG_OF +static const struct of_device_id tsc2005_of_match[] = { + { .compatible = "ti,tsc2005" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, tsc2005_of_match); +#endif + static struct spi_driver tsc2005_driver = { .driver = { .name = "tsc2005", + .of_match_table = of_match_ptr(tsc2005_of_match), .pm = &tsc200x_pm_ops, }, .probe = tsc2005_probe,