From patchwork Tue Nov 18 18:10:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 41065 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F96524035 for ; Tue, 18 Nov 2014 18:10:02 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf2741738wgg.3 for ; Tue, 18 Nov 2014 10:10:01 -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 :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; bh=A4SQmWHeaaaVceCxUO0sLdjLvt04ZStjyWYxTLtlvCE=; b=UFczW1Hx+BDynf53ALnSgmRuYtfPbMgy9BNoYqrJ9jGGYZS4gILa+rq/zK9ym32Ahg zkxeqPfjDFdoi1zEGWj6j1QttR+B2DlmK4c2wwVH/N/xkvWrmr0W/Od4yq6i2yRu1QCh FYkPc/e27ODWuEGLkg9irdvSmgAui7Afvz/iHcr/4vtLefSX4N2pnc8s+PZGBCIccuLO Ffov4bslk/WSXQN5hDXNL4U+K0Nhzqx2vFmCj8JbsWri+JMIn+us4/sN1xdU9vY7O6Ag t2I6wFLUfdWVyDoWrWYMsywbHZV7U7cXdseVBNvc3xYLRie2EmNXGwpLplmAk4GBfGLc PTpQ== X-Gm-Message-State: ALoCoQlT5yFlIAuaclkoCGRYAQ5n8FTMfAsdfx/3X4TqQ8Wc/r4XvM2oeANTce4y8aAqCZw8UWFi X-Received: by 10.152.30.66 with SMTP id q2mr15375727lah.2.1416334201517; Tue, 18 Nov 2014 10:10:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.227 with SMTP id v3ls1403942lav.91.gmail; Tue, 18 Nov 2014 10:10:01 -0800 (PST) X-Received: by 10.112.167.130 with SMTP id zo2mr37231909lbb.4.1416334201381; Tue, 18 Nov 2014 10:10:01 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id um10si56495295lbb.117.2014.11.18.10.10.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 10:10:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id 10so18210241lbg.35 for ; Tue, 18 Nov 2014 10:10:01 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr439305lad.44.1416334201298; Tue, 18 Nov 2014 10:10:01 -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 ew9csp1375897lbc; Tue, 18 Nov 2014 10:10:00 -0800 (PST) X-Received: by 10.66.121.103 with SMTP id lj7mr39295329pab.84.1416334199647; Tue, 18 Nov 2014 10:09:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rd7si38720308pab.141.2014.11.18.10.09.59 for ; Tue, 18 Nov 2014 10:09:59 -0800 (PST) Received-SPF: none (google.com: stable-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 S1754622AbaKRSJw (ORCPT + 1 other); Tue, 18 Nov 2014 13:09:52 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:53497 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbaKRSJv (ORCPT ); Tue, 18 Nov 2014 13:09:51 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id sAII9o1n023313 for ; Tue, 18 Nov 2014 12:09:50 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sAII9ok7012583; Tue, 18 Nov 2014 12:09:50 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 18 Nov 2014 12:09:50 -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 sAII9np1008679; Tue, 18 Nov 2014 12:09:49 -0600 From: Felipe Balbi To: Sekhar Nori CC: OMAP Patch Review , Felipe Balbi , Subject: [PATCH 1/2] input: touchscreen: edt-ft5x06: fix driver autoprobing Date: Tue, 18 Nov 2014 12:10:08 -0600 Message-ID: <1416334209-12360-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@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.217.176 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, } Fixes: dac90dc2 (Input: edt-ft5x06 - add DT support) Cc: # v3.15+ Signed-off-by: Felipe Balbi --- with this, we can build edt-ft5x06 as a module. Patch already going upstream, but pending review. .../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 d4f3399..3cd305c 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1121,25 +1121,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,