[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170427003918.GA1236@dtor-glaptop>
Date: Wed, 26 Apr 2017 17:39:18 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Andi Shyti <andi.shyti@...sung.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Javier Martinez Canillas <javier@....samsung.com>,
Andrzej Hajda <a.hajda@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Andi Shyti <andi@...zian.org>
Subject: Re: [PATCH v3 2/2] Input: add support for the STMicroelectronics
FingerTip touchscreen
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
Powered by blists - more mailing lists