linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC][PATCH 4/5] input: serio: add support for Amstrad Delta serial keyboard port
@ 2009-12-11  2:36 Dmitry Torokhov
  2009-12-11  3:09 ` Janusz Krzysztofik
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Torokhov @ 2009-12-11  2:36 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: linux-input, linux-omap, Tony Lindgren

On Thu, Dec 10, 2009 at 09:07:50PM +0100, Janusz Krzysztofik wrote:
> +
> +/*
> + * This table converts the amstrad mailboard scancodes to normal PC- 
> AT scancodes
> + * The diagram below shows the amstrad keyboard, with the raw  
> scancodes
> + *
> + *   (70) (7A) (46) (7C) (77)   Amstrad     (72) (69) (1A) (2A)  
> (1C) (15)
> + * [  71][1:74][2:73][3:6B][4:22][5:1B][6:1D][7:1E][8:79][9:7D] 
> [0:75][  6C]
> + *  [Q:21][W:23][E:24][R:26][T:52][Y:5D][U:0D][I:0E][O:32][P:34]  | 
> return|
> + *   [A:31][S:33][D:35][F:36][G:29][H:5B][J:03][K:76][L:3A][@:3B]   
> |   2C|
> + *  [  3C][Z:3D][X:4E][C:54][V:0B][B:05][N:41][M:42][.:43][  3E] 
> [  55]
> + *  [  83][  06][  49][           4B         ][,:44][  16][  2E] 
> [  09]
> + *
> + * These scancodes are then translated to AT scancodes using the  
> following table
> + * The amstrad keyboard does not produce any extended scancodes,  
> but we need to
> + * translate some amstrad scancodes to a AT extended scancode,  
> hence the 16bit
> + * value for the translated scancode
> + *

No, please write a proper keyboard driver instead of creating this
Frankenstain monster. It is not a generic serio-style data source so it
should not use serio, should reside in drivers/input/keyboard and create
input device by itself.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [RFC][PATCH 0/5] omap1: Amstrad Delta: add support for external keyboard
@ 2009-12-10 19:58 Janusz Krzysztofik
  2009-12-10 20:07 ` [RFC][PATCH 4/5] input: serio: add support for Amstrad Delta serial keyboard port Janusz Krzysztofik
  0 siblings, 1 reply; 14+ messages in thread
From: Janusz Krzysztofik @ 2009-12-10 19:58 UTC (permalink / raw)
  To: linux-omap; +Cc: Tony Lindgren, Dmitry Torokhov, linux-input

This series of patches adds support for an external keyboard (called 
mailboard) connected to the Amstrad Delta (E3) videophone.

The series is based on a patch by Matt Callow, created against
linux-omap-2.6.19[1], initially submitted to the e3-hacking mailing list in
April 2006[2].

Since the keyboard serial clock line is connected to a GPIO line, it generates
interrupts every single bit received. In order to handle this correctly, the
code makes use of a FIQ hardware feature. Since all MPU GPIO generated
interrupts would be converted to FIQ, the handler must include support for all
supported MPU GPIO connected devices: the keyboard, a modem and a hook switch.

My modifications to the original patch include:
- split into several patches,
- refresh against a recent linux version,
- a lot of cleanups, mainly to get rid of checkpatch reported issues,
- add support for also handling interrupts generated by a GPIO line that the
  recently added hook switch hangs off.

Created and tested against linux-omap for-next,
commit 82f1d8f22f2c65e70206e40a6f17688bf64a892c dated 2009-12-02.

Janusz Krzysztofik(5)
	omap1: Amstrad Delta: add FIQ handler for serial keyboard port interrupt
			processing
	omap1: Amstrad Delta: add a handler for processing interrupts generated by
			the FIQ routine
	omap1: Amstrad Delta: use FIQ for processing MPU GPIO interrupts
	input: serio: add support for Amstrad Delta serial keyboard port
	omap1: Amstrad Delta: modify defconfig for external keyboard support
	
 arch/arm/configs/ams_delta_defconfig             |    2
 arch/arm/mach-omap1/Kconfig                      |    8
 arch/arm/mach-omap1/Makefile                     |    3
 arch/arm/mach-omap1/ams-delta-fiq-handler.S      |  342 +++++++++++++++++++++++
 arch/arm/mach-omap1/ams-delta-fiq.c              |  175 +++++++++++
 arch/arm/mach-omap1/board-ams-delta.c            |    6
 arch/arm/mach-omap1/include/mach/ams-delta-fiq.h |   56 +++
 arch/arm/plat-omap/include/plat/irqs.h           |    4
 drivers/input/serio/Kconfig                      |    9
 drivers/input/serio/Makefile                     |    1
 drivers/input/serio/ams_delta_keyboard.c         |  240 ++++++++++++++++
 11 files changed, 845 insertions(+), 1 deletion(-)

[1] http://the.earth.li/pub/e3/2.6.19/ams-delta-keyboard.patch
[2] http://www.earth.li/pipermail/e3-hacking/2006-April/000453.html

---

There is one minor issue that I have not dealt with yet: when built with
CONFIG_OMAP_RESET_CLOCKS=y, the keyboard driver stops working. I have no idea
how I could find which clock I should enable to get it working regardless of
boot loader used. Any suggestions?

Thanks,
Janusz

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

end of thread, other threads:[~2010-03-25 13:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-11  2:36 [RFC][PATCH 4/5] input: serio: add support for Amstrad Delta serial keyboard port Dmitry Torokhov
2009-12-11  3:09 ` Janusz Krzysztofik
2009-12-11  8:01   ` Dmitry Torokhov
2009-12-12 20:34     ` Janusz Krzysztofik
2009-12-12 23:20       ` Dmitry Torokhov
2009-12-14  0:11         ` Janusz Krzysztofik
2009-12-17 15:36           ` [RFC][PATCH 4/5] input: serio: add support forAmstrad " witek mark
2009-12-17 16:37             ` [RFC][PATCH 4/5] input: serio: add supportforAmstrad " witek mark
2010-03-22 21:07           ` [RFC][PATCH 4/5] input: serio: add support for Amstrad " Janusz Krzysztofik
2010-03-24 16:16             ` Dmitry Torokhov
2010-03-24 21:21               ` Janusz Krzysztofik
2010-03-24 21:29                 ` Dmitry Torokhov
2010-03-25 13:58                   ` Janusz Krzysztofik
  -- strict thread matches above, loose matches on Subject: below --
2009-12-10 19:58 [RFC][PATCH 0/5] omap1: Amstrad Delta: add support for external keyboard Janusz Krzysztofik
2009-12-10 20:07 ` [RFC][PATCH 4/5] input: serio: add support for Amstrad Delta serial keyboard port Janusz Krzysztofik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).