[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100309185130.GF19814@core.coreip.homeip.net>
Date: Tue, 9 Mar 2010 10:51:30 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: mickib1@...il.com
Cc: jkosina@...e.cz, rafi@...s.upenn.edu, chatty@...c.fr,
peterhuewe@....de, micki@...rig.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] HID: N-trig MTM Driver fix And cleanup patch 7
On Mon, Mar 08, 2010 at 11:17:04PM +0200, mickib1@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists