From patchwork Sun Jun 17 11:46:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 10468829 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 CCFE3600CC for ; Sun, 17 Jun 2018 11:47:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC9D9286FD for ; Sun, 17 Jun 2018 11:47:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B177628899; Sun, 17 Jun 2018 11:47:17 +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 B9E3228725 for ; Sun, 17 Jun 2018 11:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936675AbeFQLrM (ORCPT ); Sun, 17 Jun 2018 07:47:12 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:60974 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936670AbeFQLrK (ORCPT ); Sun, 17 Jun 2018 07:47:10 -0400 Received: from localhost.localdomain (pD95EF0E3.dip0.t-ipconnect.de [217.94.240.227]) by mail.bugwerft.de (Postfix) with ESMTPSA id F0381289830; Sun, 17 Jun 2018 11:44:07 +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 2/5] input: touchscreen: eeti: add device tree matching table Date: Sun, 17 Jun 2018 13:46:56 +0200 Message-Id: <20180617114659.367-2-daniel@zonque.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180617114659.367-1-daniel@zonque.org> References: <20180617114659.367-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,