From patchwork Fri Apr 8 13:16:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iiro Valkonen X-Patchwork-Id: 694571 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p38DIjo4007473 for ; Fri, 8 Apr 2011 13:18:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756666Ab1DHNSp (ORCPT ); Fri, 8 Apr 2011 09:18:45 -0400 Received: from newsmtp5.atmel.com ([204.2.163.5]:20936 "EHLO sjogate2.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031Ab1DHNSo (ORCPT ); Fri, 8 Apr 2011 09:18:44 -0400 Received: from csomb01.corp.atmel.com ([10.95.30.150]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id p38DFV1c023710; Fri, 8 Apr 2011 06:15:54 -0700 (PDT) Received: from hammb01.corp.atmel.com ([10.142.130.20]) by csomb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 Apr 2011 07:18:40 -0600 Received: from [10.191.100.82] ([10.191.100.82]) by hammb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 Apr 2011 14:18:18 +0100 Message-ID: <4D9F0AA2.3010501@atmel.com> Date: Fri, 08 Apr 2011 16:16:18 +0300 From: Iiro Valkonen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Joonyoung Shim CC: Dmitry Torokhov , linux-input@vger.kernel.org Subject: Re: [PATCH 2/2 v3] Input: atmel_mxt_ts - Make CHG line high after the interrupts are enabled References: <4D821E00.5060104@atmel.com> <4D95DB70.2090604@atmel.com> In-Reply-To: X-OriginalArrivalTime: 08 Apr 2011 13:18:20.0931 (UTC) FILETIME=[6E748530:01CBF5EF] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 08 Apr 2011 13:18:45 +0000 (UTC) Make the CHG line (interrupt line) go high after the interrupts have been enabled to make sure we don't miss the falling edge. Signed-off-by: Iiro Valkonen Acked-by: Joonyoung Shim --- v3: Change the locations where this is done to ensure correct operation at FW update, and to get rid of some error handling drivers/input/touchscreen/atmel_mxt_ts.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 4012436..5f09f57 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -804,10 +804,6 @@ static int mxt_initialize(struct mxt_data *data) if (error) return error; - error = mxt_make_highchg(data); - if (error) - return error; - mxt_handle_pdata(data); /* Backup to memory */ @@ -981,6 +977,10 @@ static ssize_t mxt_update_fw_store(struct device *dev, enable_irq(data->irq); + error = mxt_make_highchg(data); + if (error) + return error; + return count; } @@ -1090,6 +1090,10 @@ static int __devinit mxt_probe(struct i2c_client *client, goto err_free_object; } + error = mxt_make_highchg(data); + if (error) + goto err_free_irq; + error = input_register_device(input_dev); if (error) goto err_free_irq;