linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dudley Du <dudl@cypress.com>
Cc: Dudley Du <dudley.dulixin@gmail.com>,
	"rydberg@euromail.se" <rydberg@euromail.se>,
	"bleung@google.com" <bleung@google.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 15/18] input: cyapa: add gen3 trackpad device read firmware image function support
Date: Thu, 4 Dec 2014 09:46:41 -0800	[thread overview]
Message-ID: <20141204174641.GB4806@dtor-ws> (raw)
In-Reply-To: <ad3bf85500174b25a4dc8f796d10d0a3@BN1PR06MB070.namprd06.prod.outlook.com>

On Mon, Nov 10, 2014 at 11:05:39AM +0000, Dudley Du wrote:
> Thanks, Dmitry
> 
> > -----Original Message-----
> > From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
> > Sent: 2014?11?10? 16:40
> > To: Dudley Du
> > Cc: rydberg@euromail.se; Dudley Du; bleung@google.com;
> > linux-input@vger.kernel.org; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v9 15/18] input: cyapa: add gen3 trackpad device read
> > firmware image function support
> >
> > On Mon, Nov 03, 2014 at 04:33:07PM +0800, Dudley Du wrote:
> > > Add read firmware image function supported for gen3 trackpad device,
> > > it can be used through debugfs read_fw interface.
> >
> > Why do we need this? Can we do the same via usespace program accessing
> > the i2c device through /dev/i2c-N?
> 
> This interface is used to test and debug only. It's defined and required by the chromium projects.
> 
> And in the driver side, becase the firmware image read process is done based on interrupt signal,
> if do this in userspace through /dev/i2c-N, there will be two issues:
> 1) for gen5, after each command, an interrupt will be asserted, so if throug /dev/i2c-N,
> userspace program cannot get the interrupt signal.
> 2) and when the interrupt signal assert, driver won't know it’s a command signal for image read,
> so it will try to process it as data report.
> To avoid this, additional interface must be added to mark the image read status and
> block interrupt signal to be process as data report.

I believe that while userspace acc4esses the device through /dev/i2c-N
you should unbind the cyapa driver from the device (via sysfs driver
core bind/unbind attribute) so that it doe snot get in the way. Once
diagnostics is done you can bind the driver back to device, restoring
normal operation.

That is how we are planning to handle other devices at factory as
well.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-12-04 17:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  8:32 [PATCH v9 01/18] input: cyapa: instruction of cyapa patches Dudley Du
2014-11-03  8:32 ` [PATCH v9 01/18] input: cyapa: add device resource management infrastructure support Dudley Du
2014-11-09 21:25   ` Dmitry Torokhov
2014-11-10  2:48     ` Dudley Du
2014-11-10  3:30       ` Dmitry Torokhov
2014-11-03  8:32 ` [PATCH v9 02/18] input: cyapa: re-design driver to support multi-trackpad in one driver Dudley Du
2014-11-10  8:18   ` Dmitry Torokhov
2014-11-10 11:04     ` Dudley Du
2014-11-03  8:32 ` [PATCH v9 03/18] input: cyapa: add gen3 trackpad device basic functions support Dudley Du
2014-11-10  8:30   ` Dmitry Torokhov
2014-11-10 11:05     ` Dudley Du
2014-11-03  8:32 ` [PATCH v9 04/18] input: cyapa: add gen5 " Dudley Du
2014-11-03  8:32 ` [PATCH v9 05/18] input: cyapa: add power management interfaces supported for the device Dudley Du
2014-11-10  8:38   ` Dmitry Torokhov
2014-11-10 11:05     ` Dudley Du
2014-11-03  8:32 ` [PATCH v9 06/18] input: cyapa: add runtime " Dudley Du
2014-11-03  8:32 ` [PATCH v9 07/18] input: cyapa: add sysfs interfaces supported in the cyapa driver Dudley Du
2014-11-03  8:33 ` [PATCH v9 08/18] input: cyapa: add gen3 trackpad device firmware update function support Dudley Du
2014-11-03  8:33 ` [PATCH v9 09/18] input: cyapa: add gen3 trackpad device read baseline " Dudley Du
2014-11-03  8:33 ` [PATCH v9 10/18] input: cyapa: add gen3 trackpad device force re-calibrate " Dudley Du
2014-11-03  8:33 ` [PATCH v9 11/18] input: cyapa: add gen5 trackpad device firmware update " Dudley Du
2014-11-03  8:33 ` [PATCH v9 12/18] input: cyapa: add gen5 trackpad device read baseline " Dudley Du
2014-11-03  8:33 ` [PATCH v9 13/18] input: cyapa: add gen5 trackpad device force re-calibrate " Dudley Du
2014-11-03  8:33 ` [PATCH v9 14/18] input: cyapa: add read firmware image debugfs interface support Dudley Du
2014-11-03  8:33 ` [PATCH v9 15/18] input: cyapa: add gen3 trackpad device read firmware image function support Dudley Du
2014-11-10  8:39   ` Dmitry Torokhov
2014-11-10 11:05     ` Dudley Du
2014-12-04 17:46       ` Dmitry Torokhov [this message]
2014-12-05  1:43         ` Dudley Du
2014-11-03  8:33 ` [PATCH v9 16/18] input: cyapa: add gen5 " Dudley Du
2014-11-03  8:33 ` [PATCH v9 17/18] input: cyapa: add read sensors raw data debugfs interface support Dudley Du
2014-11-03  8:33 ` [PATCH v9 18/18] input: cyapa: add gen5 trackpad device read raw data function support Dudley Du

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=20141204174641.GB4806@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=bleung@google.com \
    --cc=dudl@cypress.com \
    --cc=dudley.dulixin@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@euromail.se \
    /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).