Skip to contentSkip to conversation

mainstone: Fix incorrect and missed out keypad mappings.

PATCH New Vijay Kumar B 1 participant 3 messages Sep 28, 2016

lore
Share & tools
lore
#0 lore raw

cover mainstone: Fix incorrect and missed out keypad mappings.

This patch series fixes the key mappings for the mainstone board. The incorrect mappings renders the console unusable when used with the Linux kernel's fbcon driver.

Vijay Kumar B (2):
Fix incorrect key mapping for Enter key.
Add mapping for dot, slash and backspace.

 hw/arm/mainstone.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 mainstone: Fix incorrect key mapping for Enter key.

According to the manual the (5, 5) corresponds to backspace key, and not Enter key. Linux kernel maps (5, 4) to the enter key. Fixing it up to match the mapping in the Linux kernel.

---
 hw/arm/mainstone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/mainstone.c +1 -1
index 454acc5..e81b878 100644
@@ -88,7 +88,7 @@ static const struct keymap map[0xE0] = {
      * Matrix position {5,4} and other keys are missing here.
      * TODO: Compare with Linux code and test real hardware.
      */
-    [0x1c] = {5,5}, /* enter (TODO: might be wrong) */
+    [0x1c] = {5,4}, /* enter */
     [0xc8] = {6,0}, /* up */
     [0xd0] = {6,1}, /* down */
     [0xcb] = {6,2}, /* left */
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 mainstone: Add mapping for dot, slash and backspace.

In reply to Vijay Kumar B

Add missed out mappings. These mappings are from the "Intel PXA27x Processor Developer's Kit User Guide".

---
 hw/arm/mainstone.c | 3 +++
 1 file changed, 3 insertions(+)
hw/arm/mainstone.c +3 -0
index e81b878..f962236 100644
@@ -73,8 +73,10 @@ static const struct keymap map[0xE0] = {
     [0x2f] = {3,3}, /* v */
     [0x11] = {3,4}, /* w */
     [0x2d] = {3,5}, /* x */
+    [0x34] = {4,0}, /* . */
     [0x15] = {4,2}, /* y */
     [0x2c] = {4,3}, /* z */
+    [0x35] = {4,4}, /* / */
     [0xc7] = {5,0}, /* Home */
     [0x2a] = {5,1}, /* shift */
     /*
@@ -89,6 +91,7 @@ static const struct keymap map[0xE0] = {
      * TODO: Compare with Linux code and test real hardware.
      */
     [0x1c] = {5,4}, /* enter */
+    [0x0e] = {5,5}, /* backspace */
     [0xc8] = {6,0}, /* up */
     [0xd0] = {6,1}, /* down */
     [0xcb] = {6,2}, /* left */
Signature · 1 line
2.1.4