All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andi Shyti <andi.shyti@samsung.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH v3 2/2] Input: add support for the STMicroelectronics FingerTip touchscreen
Date: Wed, 26 Apr 2017 17:39:18 -0700	[thread overview]
Message-ID: <20170427003918.GA1236@dtor-glaptop> (raw)
In-Reply-To: <20170327130743.27783-3-andi.shyti@samsung.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andi Shyti <andi.shyti-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Javier Martinez Canillas
	<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Andrzej Hajda <a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andi Shyti <andi-ahk0KpmfxKRAfugRpC6u6w@public.gmane.org>
Subject: Re: [PATCH v3 2/2] Input: add support for the STMicroelectronics FingerTip touchscreen
Date: Wed, 26 Apr 2017 17:39:18 -0700	[thread overview]
Message-ID: <20170427003918.GA1236@dtor-glaptop> (raw)
In-Reply-To: <20170327130743.27783-3-andi.shyti-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-04-27  0:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170327130756epcas1p3e4d73c234d6f5b613b0b7cb37b54b972@epcas1p3.samsung.com>
2017-03-27 13:07 ` [PATCH v3 0/2] STM FingerTip S touchscreen support for TM2 board Andi Shyti
     [not found]   ` <CGME20170327130756epcas1p3134e88ccee37242db029357ae3d52603@epcas1p3.samsung.com>
2017-03-27 13:07     ` [PATCH v3 1/2] Input: add STMicroelectronics FingerTip touchscreen driver Andi Shyti
2017-03-27 13:11       ` Andi Shyti
2017-03-27 13:11         ` Andi Shyti
     [not found]   ` <CGME20170327130756epcas1p321726d525c31814c3f76895b895739cd@epcas1p3.samsung.com>
2017-03-27 13:07     ` [PATCH v3 2/2] Input: add support for the STMicroelectronics FingerTip touchscreen Andi Shyti
2017-03-27 13:07       ` Andi Shyti
2017-04-07  9:31       ` Andi Shyti
2017-04-17 10:39         ` Andi Shyti
2017-04-17 10:39           ` Andi Shyti
2017-04-25  2:31       ` Andi Shyti
2017-04-25  2:31         ` Andi Shyti
2017-04-27  0:39       ` Dmitry Torokhov [this message]
2017-04-27  0:39         ` Dmitry Torokhov
2017-04-27 23:41         ` Andi Shyti
2017-04-27 23:56           ` Dmitry Torokhov
2017-04-28  0:07             ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170427003918.GA1236@dtor-glaptop \
    --to=dmitry.torokhov@gmail.com \
    --cc=a.hajda@samsung.com \
    --cc=andi.shyti@samsung.com \
    --cc=andi@etezian.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=javier@osg.samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.