linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Fuzzey <martin.fuzzey@flowbird.group>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Ahmet Inan <inan@distec.de>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com
Subject: Re: Re: [PATCHv1 2/2] Input: EXC3000: Add support to query model and fw_version
Date: Wed, 20 Nov 2019 12:47:55 +0100	[thread overview]
Message-ID: <eb7f29f9-673d-6e37-0846-226e21b95766@flowbird.group> (raw)
In-Reply-To: <20191113002339.GJ13374@dtor-ws>

Hi Dmitry,

On 13/11/2019 01:23, Dmitry Torokhov wrote:
> Do we really need to re-fetch model (and firmware ID) on each access?
> Can we query it as probe time and cache? This I think would simplify the
> driver, as you probably would not need to hook it into the ISR. Can you
> just post a read/write transaction to fetch it without waiting for
> interrupt? Or, if single transaction does not work and you need to wait
> for certain time for response - just add msleep() and maybe mark driver
> for async probe...


Having the sysfs access actually read the data from the device can be 
useful to check that the I2C link is still working (in a test scenario).


The documentation does say that one should wait for an interrupt after 
issuing the commands.

The msleep() could work but the value would have to be empirical and 
could be fragile.

Furthermore what happens if a touch event occurs just after sending the 
query request?

Having the interrupt handler be the single read() point and dispatching 
solves that problem, even if it does complicate the driver to some extent.


One further thing is that there are other commands that may be added in 
the future that cannot be cached (commands to do tests or fimware 
updates for example).


Regards,


Martin



  reply	other threads:[~2019-11-20 11:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 18:10 [PATCHv1 1/2] Input: EXC3000: add EXC80Hxx support Sebastian Reichel
2019-11-07 18:10 ` [PATCHv1 2/2] Input: EXC3000: Add support to query model and fw_version Sebastian Reichel
2019-11-13  0:23   ` Dmitry Torokhov
2019-11-20 11:47     ` Martin Fuzzey [this message]
2019-11-22 17:43   ` Martin Fuzzey
2019-11-13  0:19 ` [PATCHv1 1/2] Input: EXC3000: add EXC80Hxx support Dmitry Torokhov
2019-11-20 11:32 ` Martin Fuzzey

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=eb7f29f9-673d-6e37-0846-226e21b95766@flowbird.group \
    --to=martin.fuzzey@flowbird.group \
    --cc=dmitry.torokhov@gmail.com \
    --cc=inan@distec.de \
    --cc=kernel@collabora.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).