Skip to contentSkip to conversation

mainstone: Fix incorrect and missed out keypad mappings.

PATCH Applied Vijay Kumar B 3 participants 5 messages Sep 28, 2016 – Sep 30, 2016

lore
Share & tools
lore
#0 lore raw

cover mainstone: Fix incorrect and missed out keypad mappings.

Resending, since I missed qemu-devel in the previous submission. Sorry about that.

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
#3 lore raw
In reply to Vijay Kumar B
Your series seems to have some coding style problems. See output below for more information:

Hi,

Your series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH 0/2] mainstone: Fix incorrect and missed out keypad mappings.

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test'
c3247be mainstone: Add mapping for dot, slash and backspace. 1674e25 mainstone: Fix incorrect key mapping for Enter key.

=== OUTPUT BEGIN ===
Checking PATCH 1/2: mainstone: Fix incorrect key mapping for Enter key....
ERROR: space required after that ',' (ctx:VxV)
#23: FILE: hw/arm/mainstone.c:91:
+ [0x1c] = {5,4}, /* enter */

                ^

total: 1 errors, 0 warnings, 8 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 2/2: mainstone: Add mapping for dot, slash and backspace....
ERROR: space required after that ',' (ctx:VxV)
#21: FILE: hw/arm/mainstone.c:76:
+ [0x34] = {4,0}, /* . */

                ^

ERROR: space required after that ',' (ctx:VxV)
#24: FILE: hw/arm/mainstone.c:79:
+ [0x35] = {4,4}, /* / */

                ^

ERROR: space required after that ',' (ctx:VxV)
#32: FILE: hw/arm/mainstone.c:94:
+ [0x0e] = {5,5}, /* backspace */

                ^

total: 3 errors, 0 warnings, 17 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#4 lore raw
In reply to Vijay Kumar B
Quoted 7 lines · Vijay Kumar B

Resending, since I missed qemu-devel in the previous submission. Sorry about that.

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.

Quoted 6 lines

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(-)

Applied to target-arm.next, thanks.

-- PMM