public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: sh_keysc: 8x8 MODE_6 fix
@ 2011-06-15 14:33 Magnus Damm
  2011-06-15 23:12 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2011-06-15 14:33 UTC (permalink / raw)
  To: linux-input; +Cc: lethal, Magnus Damm, dmitry.torokhov, simon, linux-sh

From: Magnus Damm <damm@opensource.se>

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.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/input/keyboard/sh_keysc.c |    2 +-
 include/linux/input/sh_keysc.h    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- 0001/drivers/input/keyboard/sh_keysc.c
+++ work/drivers/input/keyboard/sh_keysc.c	2011-06-15 17:59:27.000000000 +0900
@@ -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 {
--- 0001/include/linux/input/sh_keysc.h
+++ work/include/linux/input/sh_keysc.h	2011-06-15 17:48:05.000000000 +0900
@@ -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,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: 8x8 MODE_6 fix
  2011-06-15 14:33 [PATCH] input: sh_keysc: 8x8 MODE_6 fix Magnus Damm
@ 2011-06-15 23:12 ` Simon Horman
  2011-06-16  0:57   ` Magnus Damm
  2011-06-18  9:52   ` Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Horman @ 2011-06-15 23:12 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-input, lethal, dmitry.torokhov, linux-sh

On Wed, Jun 15, 2011 at 11:33:40PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> 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.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>

Reviewed-by: Simon Horman <horms@verge.net.au>

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 ?

> ---
> 
>  drivers/input/keyboard/sh_keysc.c |    2 +-
>  include/linux/input/sh_keysc.h    |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- 0001/drivers/input/keyboard/sh_keysc.c
> +++ work/drivers/input/keyboard/sh_keysc.c	2011-06-15 17:59:27.000000000 +0900
> @@ -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 {
> --- 0001/include/linux/input/sh_keysc.h
> +++ work/include/linux/input/sh_keysc.h	2011-06-15 17:48:05.000000000 +0900
> @@ -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,
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: 8x8 MODE_6 fix
  2011-06-15 23:12 ` Simon Horman
@ 2011-06-16  0:57   ` Magnus Damm
  2011-06-18  9:52   ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2011-06-16  0:57 UTC (permalink / raw)
  To: Simon Horman; +Cc: linux-input, lethal, dmitry.torokhov, linux-sh

On Thu, Jun 16, 2011 at 8:12 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jun 15, 2011 at 11:33:40PM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> 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.
>>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>
> Reviewed-by: Simon Horman <horms@verge.net.au>

Thanks!

> 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 ?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: 8x8 MODE_6 fix
  2011-06-15 23:12 ` Simon Horman
  2011-06-16  0:57   ` Magnus Damm
@ 2011-06-18  9:52   ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2011-06-18  9:52 UTC (permalink / raw)
  To: Simon Horman; +Cc: Magnus Damm, linux-input, lethal, linux-sh

On Thu, Jun 16, 2011 at 08:12:18AM +0900, Simon Horman wrote:
> On Wed, Jun 15, 2011 at 11:33:40PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> > 
> > 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.
> > 
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> 
> Reviewed-by: Simon Horman <horms@verge.net.au>
> 

Applied, thanks!

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-18  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 14:33 [PATCH] input: sh_keysc: 8x8 MODE_6 fix Magnus Damm
2011-06-15 23:12 ` Simon Horman
2011-06-16  0:57   ` Magnus Damm
2011-06-18  9:52   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox