From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754671AbdD0Aj2 (ORCPT ); Wed, 26 Apr 2017 20:39:28 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35681 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbdD0AjU (ORCPT ); Wed, 26 Apr 2017 20:39:20 -0400 Date: Wed, 26 Apr 2017 17:39:18 -0700 From: Dmitry Torokhov To: Andi Shyti Cc: Rob Herring , Javier Martinez Canillas , Andrzej Hajda , Chanwoo Choi , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti Subject: Re: [PATCH v3 2/2] Input: add support for the STMicroelectronics FingerTip touchscreen Message-ID: <20170427003918.GA1236@dtor-glaptop> References: <20170327130743.27783-1-andi.shyti@samsung.com> <20170327130743.27783-3-andi.shyti@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170327130743.27783-3-andi.shyti@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andi, Quick question: On Mon, Mar 27, 2017 at 10:07:43PM +0900, Andi Shyti wrote: > +static irqreturn_t stmfts_irq_handler(int irq, void *dev) > +{ > + struct stmfts_data *sdata = dev; > + int ret; > + > + mutex_lock(&sdata->mutex); > + ret = i2c_smbus_read_i2c_block_data(sdata->client, > + STMFTS_READ_ONE_EVENT, > + STMFTS_EVENT_SIZE, sdata->data); > + > + if (ret < 0 || ret != STMFTS_EVENT_SIZE) > + goto exit; Why do we split read into 2 chunks? Can we issue STMFTS_READ_ALL_EVENT right away instead of reading first event, analyzing it, and then (maybe) fetching the rest? Also, why do we use smbus protocol for the first event and i2c for the rest? Thanks. -- Dmitry