All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: lrg@slimlogic.co.uk, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android
Date: Tue, 17 Feb 2009 13:42:19 +0200	[thread overview]
Message-ID: <499AA29B.8090803@compulab.co.il> (raw)
In-Reply-To: <20090217100246.GB16303@rakim.wolfsonmicro.main>

Mark Brown wrote:
> On Tue, Feb 17, 2009 at 11:43:33AM +0200, Mike Rapoport wrote:
>> Please CC me, I'm not subscribed to linux-input
> 
>> Android expects BTN_TOUCH events when pen state changes. Add BTN_TOUCH
>> event reporting to allow use of wm97xx touchscreen controller wiht
>> Android devices.
> 
>> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> 
> Hrm.  While this is obviously fine from a code point of view it seems
> like it'd be better to synthesise the BTN_TOUCH events in the input core
> if we want to do this - that way all drivers will behave consistently.
> 

The difficulty here is to find out when BTN_TOUCH should be generated and what
should be its value. As far as I can see from different drivers, there's no
one-to-one correspondence between ABS_PRESSURE and BTN_TOUCH. For instance,
drivers/input/mouse/synaptics.c has

	if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
	if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);

	if (hw.z > 0) {
		input_report_abs(dev, ABS_X, hw.x);
		input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
	}
	input_report_abs(dev, ABS_PRESSURE, hw.z);

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2009-02-17 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  9:43 [PATCH] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android Mike Rapoport
2009-02-17 10:02 ` Mark Brown
2009-02-17 11:42   ` Mike Rapoport [this message]
2009-02-17 13:30     ` Mark Brown
2009-02-18  7:29       ` Mike Rapoport

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=499AA29B.8090803@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /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.