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: 41064 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C59CB24035 for ; Tue, 18 Nov 2014 18:07:38 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id q1sf1176949lam.1 for ; Tue, 18 Nov 2014 10:07:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=URyK0FR3ML8PnarVJYWFKdvMpn6+l4ROhyvhOuGSCG8=; b=ftJR/X5uXARxcv0xqKwwp8tr9bXC8zw9FaBmeUe1c6DCpyVLxefQKwII+dfYlBxYRq payPXH7/H/Apd2TEx7vr5aCgyGLuzhLAE6WO4M6DzDIeJddxhejhve5vhNb200GSdKBK vatlZgWYuPsEmY33OlA78qulMT+IsgQsq+J41I2QU0TFjPYn86qvHo5T0+YWv7rVdcnJ Hy63IKXuYsw0qJwICmJw7+E1Vqy/doOLnS4sMFqQ87ACg3B5WUTWGLO2R7PZfdiEKS7V N4OzVO4JkXLl3cOWfsRoKl1GXDo8AMl5dDPaReq4Yu1IiMtflMFauXSu41Xjs8Vcht7z mdxQ== X-Gm-Message-State: ALoCoQlVH2UAY6kdC7xMn0YuMF0k0CxiFhfBVps7QqM5SrMXh63+t5mPbA0EjfBBLSK1JcNkbgwu X-Received: by 10.181.27.135 with SMTP id jg7mr6141431wid.5.1416334057676; Tue, 18 Nov 2014 10:07:37 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.227 with SMTP id e3ls1388963laa.69.gmail; Tue, 18 Nov 2014 10:07:37 -0800 (PST) X-Received: by 10.152.116.102 with SMTP id jv6mr426095lab.40.1416334057257; Tue, 18 Nov 2014 10:07:37 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id rj3si56556684lbb.85.2014.11.18.10.07.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 10:07:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gf13so8433768lab.14 for ; Tue, 18 Nov 2014 10:07:37 -0800 (PST) X-Received: by 10.152.116.102 with SMTP id jv6mr426080lab.40.1416334057099; Tue, 18 Nov 2014 10:07:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp1375419lbc; Tue, 18 Nov 2014 10:07:36 -0800 (PST) X-Received: by 10.70.37.8 with SMTP id u8mr39071347pdj.9.1416334053931; Tue, 18 Nov 2014 10:07:33 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv14si38834672pac.19.2014.11.18.10.07.33 for ; Tue, 18 Nov 2014 10:07:33 -0800 (PST) Received-SPF: none (google.com: linux-input-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754888AbaKRSHb (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-input-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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,