linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: mickib1@gmail.com
Cc: jkosina@suse.cz, rafi@seas.upenn.edu, chatty@enac.fr,
	peterhuewe@gmx.de, micki@n-trig.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] HID: N-trig MTM Driver fix And cleanup patch 7
Date: Tue, 9 Mar 2010 10:51:30 -0800	[thread overview]
Message-ID: <20100309185130.GF19814@core.coreip.homeip.net> (raw)
In-Reply-To: <1268083024-3029-1-git-send-email-micki@n-trig.com>

On Mon, Mar 08, 2010 at 11:17:04PM +0200, mickib1@gmail.com wrote:
> +				case REPORT_GENERIC2:
> +					if ((X_CORD_VAL == nd->x_cord) && (Y_CORD_VAL == nd->y_cord) &&
> +					    (DX_CORD_VAL == nd->dx) && (DY_CORD_VAL == nd->dy) &&
> +					    (GENERIC_BYTE_VAL == value)) {
> +						if (MAX_FINGERS_SUPPORT == nd->fake_fingers--) {
> +							input_report_abs(input, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
> +							input_report_abs(input, ABS_MT_TRACKING_ID, END_OF_REPORT);
> +							input_event(input, EV_MSC, MSC_SCAN, nd->frame_index);

EV_MSC/MSC_SCAN is to be used to communicate scancodes or their
equivalents for the corresponsing KEV_KEY/KEY_xxx to userspace.

> +							input_sync(input);
> +							ntrig_dbg("Session Sync Frame %x\n", nd->frame_index);
> +						} else
> +							ntrig_dbg("Fake Finger %x\n", nd->frame_index);
> +					} else {
> +						input_report_abs(input, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
> +						input_report_abs(input, ABS_MT_TRACKING_ID, nd->finger_id);
> +						input_report_abs(input, ABS_MT_POSITION_X, nd->x_cord);
> +						input_report_abs(input, ABS_MT_POSITION_Y, nd->y_cord);
> +						input_report_abs(input, ABS_MT_TOUCH_MAJOR, nd->dx);
> +						input_report_abs(input, ABS_MT_TOUCH_MINOR, nd->dy);
> +						input_event(input, EV_MSC, MSC_PULSELED, nd->generic_byte);

No, you are not pulsing the led here. Please do not overload the events
with your application-specific usage.

New events might be allocated, but the need for them must be articulated
on a purely technical basis.

Thanks.

-- 
Dmitry

      parent reply	other threads:[~2010-03-09 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 21:17 [PATCH 7/7] HID: N-trig MTM Driver fix And cleanup patch 7 mickib1
2010-03-09  1:32 ` Rafi Rubin
     [not found]   ` <48A28051AC6D7A48B64F28272458190301AF42@Exchange-IL.n-trig.com>
2010-03-09 17:32     ` Rafi Rubin
2010-03-09 18:51 ` Dmitry Torokhov [this message]

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=20100309185130.GF19814@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=chatty@enac.fr \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=micki@n-trig.com \
    --cc=mickib1@gmail.com \
    --cc=peterhuewe@gmx.de \
    --cc=rafi@seas.upenn.edu \
    /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).