[PATCH 1/1 try#2] [INPUT] keypad driver: Added support for OpenCores Keyboard Controller

Previous thread: [PATCH 1/1] [VIDEO/LOGO]: add support for Blackfin/Linux logo for framebuffer console by Bryan Wu on Wednesday, January 30, 2008 - 5:48 am. (1 message)

Next thread: [PATCH 1/1] Input/Touchscreen Driver: add support AD7877 touchscreen driver by Bryan Wu on Wednesday, January 30, 2008 - 5:52 am. (1 message)
To: <dmitry.torokhov@...>, <linux-input@...>
Cc: <linux-kernel@...>, Javier Herrero <jherrero@...>, Bryan Wu <bryan.wu@...>
Date: Wednesday, January 30, 2008 - 5:50 am

From: Javier Herrero <jherrero@hvsistemas.es>

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
drivers/input/keyboard/Kconfig | 9 ++
drivers/input/keyboard/Makefile | 2 +
drivers/input/keyboard/opencores-kbd.c | 195 ++++++++++++++++++++++++++++++++
3 files changed, 206 insertions(+), 0 deletions(-)
create mode 100644 drivers/input/keyboard/opencores-kbd.c

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 086d58c..a0a016b 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -293,4 +293,13 @@ config KEYBOARD_BFIN
To compile this driver as a module, choose M here: the
module will be called bf54x-keys.

+config KEYBOARD_OPENCORES
+ tristate "OpenCores Keyboard Controller"
+ help
+ Say Y here if you want to use the OpenCores Keyboard Controller
+ http://www.opencores.org/projects.cgi/web/keyboardcontroller/overview
+
+ To comile this driver as a module, choose M here. the
+ module will be called opencores-kbd.
+
endif
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
index e97455f..77b47fb 100644
--- a/drivers/input/keyboard/Makefile
+++ b/drivers/input/keyboard/Makefile
@@ -25,3 +25,5 @@ obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
+obj-$(CONFIG_KEYBOARD_OPENCORES) += opencores-kbd.o
+
diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c
new file mode 100644
index 0000000..dfe68c6
--- /dev/null
+++ b/drivers/input/keyboard/opencores-kbd.c
@@ -0,0 +1,195 @@
+/*
+ * File: drivers/input/keyboard/opencores-kbd.c
+ * Based on: bf54x-keys.c
+ * Author: Javier Herrero <jherrero@hvsistemas.es>
+ *
+ * Created:
+ * Descript...

To: Bryan Wu <bryan.wu@...>
Cc: <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>, Javier Herrero <jherrero@...>
Date: Wednesday, January 30, 2008 - 7:53 am

Typo, "comile" should be "compile" here.
--

To: Will Newton <will.newton@...>
Cc: Bryan Wu <bryan.wu@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>, Javier Herrero <jherrero@...>
Date: Wednesday, January 30, 2008 - 1:07 pm

Thanks, fix it now. I will update this patch soon.

-Bryan
--

To: Will Newton <will.newton@...>
Cc: Bryan Wu <bryan.wu@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>, Javier Herrero <jherrero@...>
Date: Wednesday, January 30, 2008 - 1:18 pm

>From 2d1896f15eca96d887db9fff7988b7977e0b201d Mon Sep 17 00:00:00 2001
From: Javier Herrero <jherrero@hvsistemas.es>
Date: Thu, 31 Jan 2008 01:16:07 +0800
Subject: [PATCH] [INPUT] keypad driver: Added support for OpenCores Keyboard Controller

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
drivers/input/keyboard/Kconfig | 9 ++
drivers/input/keyboard/Makefile | 2 +
drivers/input/keyboard/opencores-kbd.c | 195 ++++++++++++++++++++++++++++++++
3 files changed, 206 insertions(+), 0 deletions(-)
create mode 100644 drivers/input/keyboard/opencores-kbd.c

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 086d58c..c404cd4 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -293,4 +293,13 @@ config KEYBOARD_BFIN
To compile this driver as a module, choose M here: the
module will be called bf54x-keys.

+config KEYBOARD_OPENCORES
+ tristate "OpenCores Keyboard Controller"
+ help
+ Say Y here if you want to use the OpenCores Keyboard Controller
+ http://www.opencores.org/projects.cgi/web/keyboardcontroller/overview
+
+ To compile this driver as a module, choose M here. the
+ module will be called opencores-kbd.
+
endif
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
index e97455f..77b47fb 100644
--- a/drivers/input/keyboard/Makefile
+++ b/drivers/input/keyboard/Makefile
@@ -25,3 +25,5 @@ obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
+obj-$(CONFIG_KEYBOARD_OPENCORES) += opencores-kbd.o
+
diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c
new file mode 100644
index 0000000..dfe68c6
--- /dev/null
+++ b/drivers/input/keyboard/opencores-kbd.c
@@ -0,0 +1,195 @@
+/*
+ * File: d...

To: Bryan Wu <bryan.wu@...>
Cc: Will Newton <will.newton@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>, Javier Herrero <jherrero@...>
Date: Tuesday, February 5, 2008 - 6:42 am

This looks utterly wrong: It assumes 1:1 mapping between Linux keycodes
and what the keyboard sends, which I can't believe is the case.

--
Vojtech Pavlik
Director SuSE Labs
--

To: Vojtech Pavlik <vojtech@...>
Cc: Bryan Wu <bryan.wu@...>, Will Newton <will.newton@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>
Date: Tuesday, February 5, 2008 - 7:18 am

Dear Vojtech,

I think that a 1:1 mapping between linux keycodes and what keyboard
sends is right, because the scan code to key code conversion is already
programmed and done inside the FPGA code.

Best regards,

Javier

--
------------------------------------------------------------------------
Javier Herrero EMAIL: jherrero@hvsistemas.com
HV Sistemas S.L. PHONE: +34 949 336 806
Los Charcones, 17A FAX: +34 949 336 792
19170 El Casar - Guadalajara - Spain WEB: http://www.hvsistemas.com

--

To: Javier Herrero <jherrero@...>
Cc: Bryan Wu <bryan.wu@...>, Will Newton <will.newton@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>
Date: Tuesday, February 5, 2008 - 7:22 am

--
Vojtech Pavlik
Director SuSE Labs
--

To: Vojtech Pavlik <vojtech@...>
Cc: Bryan Wu <bryan.wu@...>, Will Newton <will.newton@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>
Date: Tuesday, February 5, 2008 - 7:33 am

The original OpenCores keyboard controller is a 6 rows x 12 cols
keyboard controller that can be customized for other row/col sizes
modifiying Constants.vhd VHDL file, in which also the translation table
is defined, and for different key disposition schemes both the number of
rows and cols can be changed. We are currently using this controller
with a 4x4 key matrix, and with a different key mapping values, so I
thought that it would be preferable to have the driver mapping fixed to
1:1 and do the mapping in the VHDL, since in most cases the keyboard
using this controller would be different to the default keyboard defined
in the original Contants.vhd VHDL file.

Regards,

--
------------------------------------------------------------------------
Javier Herrero EMAIL: jherrero@hvsistemas.com
HV Sistemas S.L. PHONE: +34 949 336 806
Los Charcones, 17A FAX: +34 949 336 792
19170 El Casar - Guadalajara - Spain WEB: http://www.hvsistemas.com

--

To: Javier Herrero <jherrero@...>
Cc: Vojtech Pavlik <vojtech@...>, Bryan Wu <bryan.wu@...>, Will Newton <will.newton@...>, <dmitry.torokhov@...>, <linux-input@...>, <linux-kernel@...>
Date: Monday, May 12, 2008 - 1:50 am

Hi Vojtech, Will and Dmitry,

How do you think of this driver from Javier?
It works fine on Blackfin arch, but it can also be shared by other platform.
So this driver is useful of the other developers.
Could you please consider merging this driver?

If you need me to resend this patch, please ping me.

Thanks
-Bryan
--

Previous thread: [PATCH 1/1] [VIDEO/LOGO]: add support for Blackfin/Linux logo for framebuffer console by Bryan Wu on Wednesday, January 30, 2008 - 5:48 am. (1 message)

Next thread: [PATCH 1/1] Input/Touchscreen Driver: add support AD7877 touchscreen driver by Bryan Wu on Wednesday, January 30, 2008 - 5:52 am. (1 message)