* [Qemu-trivial] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
@ 2013-12-22 19:42 ` Stefan Weil
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Weil @ 2013-12-22 19:42 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Peter Maydell, Stefan Weil
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two different
matrix positions.
Some other keys are either missing or might be mapped wrongly (cf. Linux
kernel code). Don't fix these until someone can test them with real
hardware, but add TODO comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
v3:
Use 2nd alternative, so there is no change of behaviour.
hw/arm/mainstone.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 9402c84..ffbf4bd 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -75,9 +75,18 @@ static struct keymap map[0xE0] = {
[0x2c] = {4,3}, /* z */
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
- [0x39] = {5,2}, /* space */
+ /*
+ * There are two matrix positions which map to space,
+ * but QEMU can only use one of them for the reverse
+ * mapping, so simply use the second one.
+ */
+ /* [0x39] = {5,2}, space */
[0x39] = {5,3}, /* space */
- [0x1c] = {5,5}, /* enter */
+ /*
+ * 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) */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
[0xcb] = {6,2}, /* left */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
@ 2013-12-22 19:42 ` Stefan Weil
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Weil @ 2013-12-22 19:42 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Peter Maydell, Stefan Weil
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two different
matrix positions.
Some other keys are either missing or might be mapped wrongly (cf. Linux
kernel code). Don't fix these until someone can test them with real
hardware, but add TODO comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
v3:
Use 2nd alternative, so there is no change of behaviour.
hw/arm/mainstone.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 9402c84..ffbf4bd 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -75,9 +75,18 @@ static struct keymap map[0xE0] = {
[0x2c] = {4,3}, /* z */
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
- [0x39] = {5,2}, /* space */
+ /*
+ * There are two matrix positions which map to space,
+ * but QEMU can only use one of them for the reverse
+ * mapping, so simply use the second one.
+ */
+ /* [0x39] = {5,2}, space */
[0x39] = {5,3}, /* space */
- [0x1c] = {5,5}, /* enter */
+ /*
+ * 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) */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
[0xcb] = {6,2}, /* left */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
2013-12-22 19:42 ` [Qemu-devel] " Stefan Weil
@ 2013-12-22 19:51 ` Peter Maydell
-1 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2013-12-22 19:51 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Trivial, QEMU Developers
On 22 December 2013 19:42, Stefan Weil <sw@weilnetz.de> wrote:
> cgcc reported a duplicate initialisation. Mainstone includes a matrix
> keyboard where two different positions map to 'space'.
>
> QEMU uses the reversed mapping and does not map 'space' to two different
> matrix positions.
>
> Some other keys are either missing or might be mapped wrongly (cf. Linux
> kernel code). Don't fix these until someone can test them with real
> hardware, but add TODO comments.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
@ 2013-12-22 19:51 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2013-12-22 19:51 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Trivial, QEMU Developers
On 22 December 2013 19:42, Stefan Weil <sw@weilnetz.de> wrote:
> cgcc reported a duplicate initialisation. Mainstone includes a matrix
> keyboard where two different positions map to 'space'.
>
> QEMU uses the reversed mapping and does not map 'space' to two different
> matrix positions.
>
> Some other keys are either missing or might be mapped wrongly (cf. Linux
> kernel code). Don't fix these until someone can test them with real
> hardware, but add TODO comments.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
2013-12-22 19:42 ` [Qemu-devel] " Stefan Weil
@ 2013-12-23 12:12 ` Michael Tokarev
-1 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2013-12-23 12:12 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, Peter Maydell, qemu-devel
22.12.2013 23:42, Stefan Weil wrote:
> cgcc reported a duplicate initialisation. Mainstone includes a matrix
> keyboard where two different positions map to 'space'.
Thanks, applied to the trivial-patches queue.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] mainstone: Fix duplicate array values for key 'space'
@ 2013-12-23 12:12 ` Michael Tokarev
0 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2013-12-23 12:12 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, Peter Maydell, qemu-devel
22.12.2013 23:42, Stefan Weil wrote:
> cgcc reported a duplicate initialisation. Mainstone includes a matrix
> keyboard where two different positions map to 'space'.
Thanks, applied to the trivial-patches queue.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-23 12:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-22 19:42 [Qemu-trivial] [PATCH v3] mainstone: Fix duplicate array values for key 'space' Stefan Weil
2013-12-22 19:42 ` [Qemu-devel] " Stefan Weil
2013-12-22 19:51 ` [Qemu-trivial] " Peter Maydell
2013-12-22 19:51 ` [Qemu-devel] " Peter Maydell
2013-12-23 12:12 ` [Qemu-trivial] " Michael Tokarev
2013-12-23 12:12 ` [Qemu-devel] " Michael Tokarev
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.