From patchwork Tue Nov 18 18:07:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 5332141 Return-Path: X-Original-To: patchwork-linux-omap@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 537239F2ED for ; Tue, 18 Nov 2014 18:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76811201EC for ; Tue, 18 Nov 2014 18:07:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BE8C201EF for ; Tue, 18 Nov 2014 18:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754886AbaKRSHb (ORCPT ); Tue, 18 Nov 2014 13:07:31 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:53417 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbaKRSH3 (ORCPT ); Tue, 18 Nov 2014 13:07:29 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id sAII6sQX023054; Tue, 18 Nov 2014 12:06:54 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAII6s1s031312; Tue, 18 Nov 2014 12:06:54 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Tue, 18 Nov 2014 12:06:53 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAII6r9N005140; Tue, 18 Nov 2014 12:06:53 -0600 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , "Linux ARM Kernel Mailing List" , Felipe Balbi , =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= , Rob Herring , Dmitry Torokhov , , , Subject: [PATCH 06/10] input: touchscreen: edt-ft5x06: fix driver autoprobing Date: Tue, 18 Nov 2014 12:07:04 -0600 Message-ID: <1416334028-7766-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1416334028-7766-1-git-send-email-balbi@ti.com> References: <1416334028-7766-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 i2c devices match against struct i2c_device_id even for CONFIG_OF case, so adding a struct of_device_id doesn't change anything. As a result, currently, edt-ft5x06 will not autoprobe if built as a module. To fix the issue and still maintain backwards compatibility with all DTS files currently in tree, we're just moving all ids from of_device_id to i2c_device_id while also adding the following specific ids which should be used from now on: { "edt-ft5206", 0, } { "edt-ft5306", 0, } { "edt-ft5406", 0, } Cc: Lothar Waßmann Cc: Rob Herring Cc: Dmitry Torokhov Cc: Cc: Cc: # v3.15+ Fixes: dac90dc2 (Input: edt-ft5x06 - add DT support) Signed-off-by: Felipe Balbi --- .../bindings/input/touchscreen/edt-ft5x06.txt | 9 ++++++--- drivers/input/touchscreen/edt-ft5x06.c | 17 ++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 76db967..50bd5d2 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -14,9 +14,12 @@ bindings. Required properties: - - compatible: "edt,edt-ft5206" - or: "edt,edt-ft5306" - or: "edt,edt-ft5406" + - compatible: "edt-ft5206" + or: "edt-ft5306" + or: "edt-ft5406" + or: "edt,edt-ft5206" (deprecated) + or: "edt,edt-ft5306" (deprecated) + or: "edt,edt-ft5406" (deprecated) - reg: I2C slave address of the chip (0x38) - interrupt-parent: a phandle pointing to the interrupt controller diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index ee3434f..f161ff9 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1119,25 +1119,20 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, static const struct i2c_device_id edt_ft5x06_ts_id[] = { { "edt-ft5x06", 0, }, + { "edt-ft5206", 0, }, + { "edt-ft5306", 0, }, + { "edt-ft5406", 0, }, + { "edt,edt-ft5206", 0, }, + { "edt,edt-ft5306", 0, }, + { "edt,edt-ft5406", 0, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); -#ifdef CONFIG_OF -static const struct of_device_id edt_ft5x06_of_match[] = { - { .compatible = "edt,edt-ft5206", }, - { .compatible = "edt,edt-ft5306", }, - { .compatible = "edt,edt-ft5406", }, - { /* sentinel */ } -}; -MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match); -#endif - static struct i2c_driver edt_ft5x06_ts_driver = { .driver = { .owner = THIS_MODULE, .name = "edt_ft5x06", - .of_match_table = of_match_ptr(edt_ft5x06_of_match), .pm = &edt_ft5x06_ts_pm_ops, }, .id_table = edt_ft5x06_ts_id,