Part Number:TCA8418
在kernel5中,配置了tca8418的配置CONFIG_KEYBOARD_TCA8418=y,并且在设备树中使用如下代码配置了键值,但是实际按键的键值并非是我配置的,修改按键值也不管用。您可以帮忙分析下吗?
linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_1) MATRIX_KEY(0x01, 0x00, KEY_2) MATRIX_KEY(0x02, 0x00, KEY_3) MATRIX_KEY(0x03, 0x00, KEY_4) MATRIX_KEY(0x04, 0x00, KEY_5) MATRIX_KEY(0x00, 0x01, KEY_6) MATRIX_KEY(0x01, 0x01, KEY_7) MATRIX_KEY(0x02, 0x01, KEY_8) MATRIX_KEY(0x03, 0x01, KEY_9) MATRIX_KEY(0x04, 0x01, KEY_0) MATRIX_KEY(0x00, 0x02, KEY_MINUS) MATRIX_KEY(0x01, 0x02, KEY_EQUAL) MATRIX_KEY(0x02, 0x02, KEY_BACKSPACE) MATRIX_KEY(0x03, 0x02, KEY_TAB) MATRIX_KEY(0x04, 0x02, KEY_Q) MATRIX_KEY(0x00, 0x03, KEY_W) MATRIX_KEY(0x01, 0x03, KEY_E) MATRIX_KEY(0x02, 0x03, KEY_R) MATRIX_KEY(0x03, 0x03, KEY_T) MATRIX_KEY(0x04, 0x03, KEY_Y) MATRIX_KEY(0x00, 0x04, KEY_U) MATRIX_KEY(0x01, 0x04, KEY_I) MATRIX_KEY(0x02, 0x04, KEY_O) MATRIX_KEY(0x03, 0x04, KEY_P) MATRIX_KEY(0x04, 0x04, KEY_LEFTBRACE) MATRIX_KEY(0x00, 0x05, KEY_RIGHTBRACE) MATRIX_KEY(0x01, 0x05, KEY_ENTER) MATRIX_KEY(0x02, 0x05, KEY_LEFTCTRL) MATRIX_KEY(0x03, 0x05, KEY_A) MATRIX_KEY(0x04, 0x05, KEY_S) >;
Kailyn Chen:
您好,抱歉,我对Linux driver不太懂,所以这个代码我无法帮助到您。
我找了关于TCA8418的Linux driver的几个帖子,里面有包含它的代码。希望对您有所帮助,如果仍未能解决 ,再联系。
比如:
https://github.com/torvalds/linux/blob/master/drivers/input/keyboard/tca8418_keypad.c
https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_接口_3901088
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/756496/linux-tca8418-mutliple-keys-press-events-are-received
https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_接口_3540026