From patchwork Sat Jun 23 15:45:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 10483749 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 4BD976023A for ; Sat, 23 Jun 2018 15:46:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52E0C2892C for ; Sat, 23 Jun 2018 15:46:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47BC52896D; Sat, 23 Jun 2018 15:46:36 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 E52AE28A04 for ; Sat, 23 Jun 2018 15:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751596AbeFWPqd (ORCPT ); Sat, 23 Jun 2018 11:46:33 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:47858 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbeFWPqc (ORCPT ); Sat, 23 Jun 2018 11:46:32 -0400 Received: from localhost.localdomain (p57BC930A.dip0.t-ipconnect.de [87.188.147.10]) by mail.bugwerft.de (Postfix) with ESMTPSA id 0758D28B04B; Sat, 23 Jun 2018 15:43:21 +0000 (UTC) From: Daniel Mack To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Daniel Mack Subject: [PATCH v2 2/4] input: touchscreen: eeti: add device tree matching table Date: Sat, 23 Jun 2018 17:45:31 +0200 Message-Id: <20180623154533.26901-3-daniel@zonque.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180623154533.26901-1-daniel@zonque.org> References: <20180623154533.26901-1-daniel@zonque.org> 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 Provide a match table so that the driver can be used in devicetree setups. More properties are added in a later patch. Signed-off-by: Daniel Mack --- drivers/input/touchscreen/eeti_ts.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 2facad75eb6d..cc4fd33f9d6d 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -262,10 +263,18 @@ static const struct i2c_device_id eeti_ts_id[] = { }; MODULE_DEVICE_TABLE(i2c, eeti_ts_id); +#ifdef CONFIG_OF +static const struct of_device_id of_eeti_ts_match[] = { + { .compatible = "eeti,exc3000-i2c", }, + { } +}; +#endif + static struct i2c_driver eeti_ts_driver = { .driver = { .name = "eeti_ts", .pm = &eeti_ts_pm, + .of_match_table = of_match_ptr(of_eeti_ts_match), }, .probe = eeti_ts_probe, .id_table = eeti_ts_id,