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. -- 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