Re: [PATCH 7/7] HID: N-trig MTM Driver fix And cleanup patch 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 08, 2010 at 11:17:04PM +0200, mickib1@xxxxxxxxx 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-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux