All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.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 16:42:29 +0900	[thread overview]
Message-ID: <4BF4E7E5.5000006@samsung.com> (raw)
In-Reply-To: <20100520070655.GA8080@core.coreip.homeip.net>

On 5/20/2010 4:06 PM, Dmitry Torokhov wrote:
> 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?
> 

OK, i will make a separate keypad driver and it will support MCS5080
keypad together.

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

Do you mean a implementation of setkeycode and getkeycode functions?

>> +
>> +	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?
> 

Yes, this keypad doesn't report key values when releases and keypad
cannot detect several keys at once, so i saved and used last key_code.

>> +
>> +	input_report_key(input, key_code, pressed ? 1 : 0);
>> +	input_sync(input);
> 
> Please also report EV_MSC/MSC_SCAN.
> 

OK.

Thanks.

  reply	other threads:[~2010-05-20  7:42 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
2010-05-20  7:42   ` Joonyoung Shim [this message]
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=4BF4E7E5.5000006@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dmitry.torokhov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.