From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Henrik Rydberg" Subject: Re: [PATCH 03/14 v3] Input: atmel_mxt_ts - refactor mxt_read/write_reg to take a length Date: Tue, 24 Apr 2012 13:23:19 +0200 Message-ID: <20120424112319.GA9688@polaris.bitmath.org> References: <1334755319-21365-1-git-send-email-djkurtz@chromium.org> <1334755319-21365-4-git-send-email-djkurtz@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtprelay-b22.telenor.se ([195.54.99.213]:40159 "EHLO smtprelay-b22.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752828Ab2DXLTk (ORCPT ); Tue, 24 Apr 2012 07:19:40 -0400 Content-Disposition: inline In-Reply-To: <1334755319-21365-4-git-send-email-djkurtz@chromium.org> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Daniel Kurtz Cc: Dmitry Torokhov , Joonyoung Shim , Nick Dyer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benson Leung , Yufeng Shen Hi Daniel, > The i2c bus requires 5 bytes to do a 1 byte read (1-byte i2c address + 2 > byte offset + 1-byte i2c address + 1 byte data), or 4 bytes to do a > 1-byte write (1 byte i2c address + 2 byte offset + 1 byte data). > > By taking a length with reads and writes, the driver can amortize > transaction overhead by performing larger transactions where appropriate. > > This patch just sets up the new API. Later patches refactor reads/writes > to take advantage of the larger transactions. > > These functions are also now return any errors reported by the i2c layer. > > Signed-off-by: Daniel Kurtz > --- In the cyttsp a dedicate tx buffer is used, which is a bit easier on the eyes. OTOH, the write operation seems infrequent enough to not matter much, so Acked-by: Henrik Rydberg Thanks for your patience, Henrik