Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752948Ab3IRR3g (ORCPT ); Wed, 18 Sep 2013 13:29:36 -0400 Received: from mta1.parkeon.com ([91.121.43.66]:33981 "EHLO mta1.parkeon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116Ab3IRR3f (ORCPT ); Wed, 18 Sep 2013 13:29:35 -0400 Message-ID: <5239DBDE.7010709@parkeon.com> Date: Wed, 18 Sep 2013 18:59:10 +0200 From: Martin Fuzzey Reply-To: mfuzzey@parkeon.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Nick Dyer CC: Dmitry Torokhov , Daniel Kurtz , Henrik Rydberg , Joonyoung Shim , Alan Bowens , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Meerwald , Benson Leung , Olof Johansson Subject: Re: [11/51] Input: atmel_mxt_ts - Implement CRC check for configuration data References: <1372337366-9286-12-git-send-email-nick.dyer@itdev.co.uk> In-Reply-To: <1372337366-9286-12-git-send-email-nick.dyer@itdev.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 22 On 27/06/13 14:48, Nick Dyer wrote: > The configuration is stored in NVRAM on the maXTouch chip. When the device is > reset it reports a CRC of the stored configuration values. Therefore it isn't > necessary to send the configuration on each probe - we can check the CRC > matches and avoid a timeconsuming backup/reset cycle. > > Signed-off-by: Nick Dyer > Acked-by: Benson Leung > -static unsigned mxt_extract_T6_csum(const u8 *csum) > +static u16 mxt_extract_T6_csum(const u8 *csum) > { > return csum[0] | (csum[1] << 8) | (csum[2] << 16); > } Shouldn't this be u32? It's losing data causing the checksums not to match for me. -- 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/