From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: riverful.kim@samsung.com, kyungmin.park@samsung.com,
linux-input@vger.kernel.org
Subject: Re: [PATCH] input: mcs5000 - Add MCS5000 touchkey support
Date: Thu, 20 May 2010 00:06:55 -0700 [thread overview]
Message-ID: <20100520070655.GA8080@core.coreip.homeip.net> (raw)
In-Reply-To: <4BF4DA4D.1090407@samsung.com>
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
next prev parent reply other threads:[~2010-05-20 7:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 6:44 [PATCH] input: mcs5000 - Add MCS5000 touchkey support Joonyoung Shim
2010-05-20 7:06 ` Dmitry Torokhov [this message]
2010-05-20 7:42 ` Joonyoung Shim
2010-05-20 8:15 ` Dmitry Torokhov
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=20100520070655.GA8080@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=riverful.kim@samsung.com \
/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).