From patchwork Sat Jun 7 23:53:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Budig X-Patchwork-Id: 4316531 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CCA79BEEAA for ; Sun, 8 Jun 2014 00:30:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 037102025A for ; Sun, 8 Jun 2014 00:30:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 225EE20170 for ; Sun, 8 Jun 2014 00:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753155AbaFHAaE (ORCPT ); Sat, 7 Jun 2014 20:30:04 -0400 Received: from mail.kernelconcepts.de ([212.60.202.196]:58522 "EHLO mail.kernelconcepts.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbaFHAaD (ORCPT ); Sat, 7 Jun 2014 20:30:03 -0400 X-Greylist: delayed 2116 seconds by postgrey-1.27 at vger.kernel.org; Sat, 07 Jun 2014 20:30:02 EDT Received: from [77.182.13.176] (helo=[192.168.23.111]) by mail.kernelconcepts.de with esmtpa (Exim 4.72) (envelope-from ) id 1WtR8D-0001go-5F; Sun, 08 Jun 2014 02:38:41 +0200 Message-ID: <5393A60C.8040207@kernelconcepts.de> Date: Sun, 08 Jun 2014 01:53:48 +0200 From: Simon Budig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Dmitry Torokhov , =?ISO-8859-1?Q?Lothar_?= =?ISO-8859-1?Q?Wa=DFmann?= CC: Henrik Rydberg , Grant Likely , Rob Herring , Fugang Duan , Jingoo Han , linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org, =?ISO-8859-1?Q?Robert_W=F6rle?= Subject: [patch] Input: edt-ft5x06 - fix an i2c write for M09 support X-Enigmail-Version: 1.6+git0.20140323 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all. I received notice from Robert Wörle who spotted a bug in the ft5x06 driver (M09 support) which can result in bogus values being written into the configuration registers. Paul wrote: > I think i found the problem, as the driver sends 3 bytes instead of 2 > when accessing a register on the M09 firmware. > Therefore , writing to gain seems to overflow into the offset register. > > This seems to be even in the lastet upstream driver so i created a patch > for this driver which you find attached. > > @Simon Budig > > Find attached a patch to fix this edt driver bug, feel free to comment , > test and commit upstream ;-) He is right, his fix is correct. Please include his patch into the repository. Acked-By: Simon Budig Thanks, Simon From 36b9ac0e8206efefc8795c925b0f3b63ab29fd08 Mon Sep 17 00:00:00 2001 From: Robert Woerle Date: Wed, 28 May 2014 13:22:09 +0200 Subject: [PATCH] Input: edt-ft5x06 - fix i2c writes to 2 bytes on M09 firmware Signed-off-by: Robert Woerle --- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index f8815be..d4f3399 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -271,7 +271,7 @@ static int edt_ft5x06_register_write(struct edt_ft5x06_ts_data *tsdata, wrbuf[0] = addr; wrbuf[1] = value; - return edt_ft5x06_ts_readwrite(tsdata->client, 3, + return edt_ft5x06_ts_readwrite(tsdata->client, 2, wrbuf, 0, NULL); default: -- 1.7.9.5