Re: [PATCH] input: mcs5000 - Add MCS5000 touchkey support

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

 



Hi Joonyoung,

On Thu, May 20, 2010 at 03:44:29PM +0900, Joonyoung Shim wrote:
> The MELPAS MCS5000 can use to touchkey controller. This is patch to
> support touchkey at original MCS5000 touchscreen driver.
> 

Not much of the touchscreen code ends up being reused it seems. Would
not creating a separate keypad driver make more sense?

Also, please amke sure that driver allows remapping the keymap (by
setting keycode, kmeycodemax, keycodesize in input device).

> +
> +	key_val = val & 0x7f;
> +	pressed = val >> 7;
> +
> +	if (pressed) {
> +		for (i = 0; i < pdata->keymap_size; i++) {
> +			if (MCS5000_KEY_VAL(pdata->keymap[i]) == key_val) {
> +				key_code = MCS5000_KEY_CODE(pdata->keymap[i]);
> +				data->key_code = key_code;
> +				break;
> +			}
> +		}
> +	} else
> +		key_code = data->key_code;

Does that mean that controller does not report code of released key?
And we can't have several keys being pressed at once?

> +
> +	input_report_key(input, key_code, pressed ? 1 : 0);
> +	input_sync(input);

Please also report EV_MSC/MSC_SCAN.

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