Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227Ab2FSK0K (ORCPT ); Tue, 19 Jun 2012 06:26:10 -0400 Received: from [89.21.227.130] ([89.21.227.130]:52692 "EHLO mail.epsilon.itdev.co.uk" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751768Ab2FSK0H (ORCPT ); Tue, 19 Jun 2012 06:26:07 -0400 Message-ID: <4FE053BD.2090605@itdev.co.uk> Date: Tue, 19 Jun 2012 11:26:05 +0100 From: Nick Dyer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Yufeng Shen CC: Daniel Kurtz , Dmitry Torokhov , Henrik Rydberg , Joonyoung Shim , linux-input@vger.kernel.org, Iiro Valkonen , Benson Leung , Olof Johansson , linux-kernel@vger.kernel.org, "Bowens, Alan" Subject: Re: [PATCH 14/22 v4] Input: atmel_mxt_ts - don't re-read matrix after applying pdata References: <1339992522-22073-1-git-send-email-djkurtz@chromium.org> <1339992522-22073-15-git-send-email-djkurtz@chromium.org> <4FDF4345.40508@itdev.co.uk> In-Reply-To: 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 Content-Length: 2210 Lines: 61 Yufeng Shen wrote: > On Mon, Jun 18, 2012 at 11:03 AM, Nick Dyer wrote: >> Daniel Kurtz wrote: >>> The matrix x/y size in the Info ID Block represents the number of x/y >>> trace lines on the device. There is no need to re-read them after >>> applying pdata config, since pdata only configures the object table >>> etnries. The matrix size read from the ID can only be updated by a >>> firmware update. >> >> This isn't correct. For example, mXT224 can be configured as 16x14, 17x13, >> 18x12, etc. This only takes effect when the chip is reset, which is why it >> is necessary to re-read them after applying the config. > > so look at structure mxt_info > > struct mxt_info { > u8 family_id; > u8 variant_id; > u8 version; > u8 build; > u8 matrix_xsize; > u8 matrix_ysize; > u8 object_num; > }; > > I think it is meant to be corresponding to Information Block of the > device, of which > the matrix_xsize and matrix_ysize mean "The size of the matrix the > device supports", > which should be fixed for a certain chip. As I said, it's not fixed, there is a mode setting (T28 byte 2) which alters the matrix size. This is documented in the protocol guide, if you have it. You can also verify this if you want: change mode setting, backup, reset, and read the information block, you'll see the matrix size changes. I've just checked that myself on an mXT224. I also asked the guys at Atmel that I work with, and they confirm that this behaviour is as designed. > The configurable matrix size is in T9 XSIZE/YSIZE, which, if ever > needed to be read back, > probably read back into something other than mxt_info struct. The position of the touchscreen within the matrix is a separate configurable setting, you're confusing the two. cheers -- Nick Dyer Software Engineer, ITDev Ltd Hardware and Software Development Consultancy Website: http://www.itdev.co.uk -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/