All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@bitmath.org>
To: Matt Whitlock <linux@mattwhitlock.name>
Cc: linux-input@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH] Input: bcm5974 - report highest finger pressure to Synaptics
Date: Wed, 03 Jun 2015 14:52:59 +0200	[thread overview]
Message-ID: <556EF8AB.6090704@bitmath.org> (raw)
In-Reply-To: <119471698.ELkjzU3HSk@crushinator>

On 06/03/2015 02:31 PM, Matt Whitlock wrote:
> On Wednesday, 3 June 2015, at 2:24 pm, Henrik Rydberg wrote:
>>> This patch changes the report_synaptics_data() function so that it reports
>>> the highest touch_major and highest tool_major of any touching finger as
>>> ABS_PRESSURE and ABS_TOOL_WIDTH, respectively.
>>
>> I appreciate the problem, but I would much rather have bcm5974 converted
>> to use input_mt_report_pointer_emulation() instead. The emulation code
>> has been left as is for a long while, but this seems to be a good time
>> to convert it.
> 
> report_tp_state() calls input_mt_sync_frame(), which in turn calls input_mt_report_pointer_emulation() already. So does this mean that report_synaptics_data() can be removed entirely?
> 

The bcm5974 driver does not advertise ABS_MT_PRESSURE, and therefore
ABS_PRESSURE is not reported via input_mt_sync_frame(). Furthermore,
ABS_TOOL_WIDTH is not handled at all in input_mt_report_pointer_emulation().

To handle pressure automatically, one would need to advertise (and use)
ABS_MT_PRESSURE. There is a misnomer in the driver, let say for historical
reasons, so that ABS_MT_TOUCH_MAJOR gets reported in the ABS_PRESSURE field.
This is a bit of a problem, but quite solvable.

For tool width, it is hard to imagine ever being able to remove that
functionality completely. However, it can be transferred to
input_mt_report_pointer_emulation() instead, provided every user of that
function is analyzed for consequences and usage of ABS_MT_WIDTH_MAJOR.

It would be great to simply remove report_synaptics_data(), if possible,
retaining the precise behavior. Barring the bug, of course.

Thanks,
Henrik


  reply	other threads:[~2015-06-03 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 11:49 [PATCH] Input: bcm5974 - report highest finger pressure to Synaptics Matt Whitlock
2015-06-03 12:24 ` Henrik Rydberg
2015-06-03 12:31   ` Matt Whitlock
2015-06-03 12:52     ` Henrik Rydberg [this message]
2015-06-09  1:07       ` [PATCH 1/2] Input: input_mt_report_pointer_emulation(), rescale pressure + tool width Matt Whitlock
2015-06-09  1:07         ` [PATCH 2/2] Input: bcm5974 - report ABS_MT_PRESSURE + remove redundant emulation code Matt Whitlock
2015-07-06 18:37           ` Matt Whitlock
2015-07-06 19:11             ` Henrik Rydberg
2015-07-06 19:35               ` Matt Whitlock
2015-07-06 19:44                 ` Henrik Rydberg
2015-07-06 19:59                   ` Matt Whitlock

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=556EF8AB.6090704@bitmath.org \
    --to=rydberg@bitmath.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@mattwhitlock.name \
    /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.