From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760615Ab2CTPi1 (ORCPT ); Tue, 20 Mar 2012 11:38:27 -0400 Received: from [89.21.227.130] ([89.21.227.130]:35679 "EHLO mail.epsilon.itdev.co.uk" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1759756Ab2CTPiZ (ORCPT ); Tue, 20 Mar 2012 11:38:25 -0400 Message-ID: <4F68A46D.9020601@itdev.co.uk> Date: Tue, 20 Mar 2012 08:38:21 -0700 From: Nick Dyer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Daniel Kurtz CC: Dmitry Torokhov , Joonyoung Shim , Iiro Valkonen , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benson Leung , Yufeng Shen , "Tiwari, Atul" , "Bowens, Alan" Subject: Re: [PATCH 19/20] Input: atmel_mxt_ts - remove mxt_make_highchg and parse T6 report References: <1331640263-18935-1-git-send-email-djkurtz@chromium.org> <1331640263-18935-20-git-send-email-djkurtz@chromium.org> In-Reply-To: <1331640263-18935-20-git-send-email-djkurtz@chromium.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Daniel Kurtz wrote: > This function attempts to make the CHG pin high by reading a bunch of > messages until the device is happy. Instead of just blindly trying to > read a fixed number of messages, let's actually read and process them. > > It turns out that the messages after boot or nvupdates are T6 reports, > containing a status, and the config memory checksum. So, let's parse > them and dump a useful info message. > > Signed-off-by: Daniel Kurtz mxt_make_highchg exists due to the interrupts being edge triggered. It forces the CHG line to go high. With this implementation, I suspect that if a new message arrives after you have read T44 and before you finish processing messages, then the interrupt handler will not ever be run. What testing have you done on this? The printout of T6 messages looks OK, though. I'd prefer to see a lookup table for the report IDs. -- Nick Dyer Software Engineer, ITDev Ltd Hardware and Software Development Consultancy Website: http://www.itdev.co.uk