input: sh_keysc: 8x8 MODE_6 fix
Subsystems (3)
PATCH 1/1 input: sh_keysc: 8x8 MODE_6 fix
From: Magnus Damm <[email protected]>
The MODE_6 support in sh_keysc.c is incorrect without this patch. According to the data sheet for G4, AP4 and AG5 KEYSC MODE_6 is 8x8 keys. Bump up MAXKEYS to 64 too.
---
drivers/input/keyboard/sh_keysc.c | 2 +- include/linux/input/sh_keysc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/keyboard/sh_keysc.c +1 -1
@@ -32,7 +32,7 @@ static const struct { [SH_KEYSC_MODE_3] = { 2, 4, 7 }, [SH_KEYSC_MODE_4] = { 3, 6, 6 }, [SH_KEYSC_MODE_5] = { 4, 6, 7 }, - [SH_KEYSC_MODE_6] = { 5, 7, 7 }, + [SH_KEYSC_MODE_6] = { 5, 8, 8 }, };struct sh_keysc_priv {
include/linux/input/sh_keysc.h +1 -1
@@ -1,7 +1,7 @@ #ifndef __SH_KEYSC_H__ #define __SH_KEYSC_H__ -#define SH_KEYSC_MAXKEYS 49 +#define SH_KEYSC_MAXKEYS 64 struct sh_keysc_info { enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3,
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
The
MODE_6support insh_keysc.cis incorrect without this patch. According to the data sheet for G4, AP4 and AG5 KEYSCMODE_6is 8x8 keys. Bump up MAXKEYS to 64 too.Signed-off-by Magnus Damm <[email protected]>
Do we also need to update the platform data for ag5evm which is currently using SH_KEYSC_MODE_6 but with 49 entries in its keysc_platdata.keycodes ?
Quoted 29 lines
---
drivers/input/keyboard/sh_keysc.c | 2 +- include/linux/input/sh_keysc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/input/keyboard/sh_keysc.c +1
-1@@ -32,7 +32,7 @@ static const struct { [SH_KEYSC_MODE_3] = { 2, 4, 7 }, [SH_KEYSC_MODE_4] = { 3, 6, 6 }, [SH_KEYSC_MODE_5] = { 4, 6, 7 }, - [SH_KEYSC_MODE_6] = { 5, 7, 7 }, + [SH_KEYSC_MODE_6] = { 5, 8, 8 }, };struct sh_keysc_priv {include/linux/input/sh_keysc.h +1
-1@@ -1,7 +1,7 @@ #ifndef __SH_KEYSC_H__ #define __SH_KEYSC_H__ -#define SH_KEYSC_MAXKEYS 49 +#define SH_KEYSC_MAXKEYS 64 struct sh_keysc_info { enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3,
Quoted 10 lines · Simon Horman
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
The
MODE_6support insh_keysc.cis incorrect without this patch. According to the data sheet for G4, AP4 and AG5 KEYSCMODE_6is 8x8 keys. Bump up MAXKEYS to 64 too.Signed-off-by Magnus Damm <[email protected]>Reviewed-by Simon Horman <[email protected]>
Thanks!
Quoted 3 lines
Do we also need to update the platform data for ag5evm which is currently using
SH_KEYSC_MODE_6but with 49 entries in its keysc_platdata.keycodes ?
Yes, eventually we need to update the board support code as well. Chances are that existing out-of-tree board support code is broken. So we need updated platform data together with a pinmux configuration that matches the board schematics. Tested on real hardware using evtest.
Cheers,
/ magnus
Quoted 11 lines · Simon Horman
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
The
MODE_6support insh_keysc.cis incorrect without this patch. According to the data sheet for G4, AP4 and AG5 KEYSCMODE_6is 8x8 keys. Bump up MAXKEYS to 64 too.Signed-off-by Magnus Damm <[email protected]>Reviewed-by Simon Horman <[email protected]>
Applied, thanks!
Signature · 1 line
Dmitry