input: New driver for Altera PS/2 controller
Subsystems (2)
PATCH 1/1 input: New driver for Altera PS/2 controller
This patch adds a new SERIO driver to support the Altera University Program PS/2 controller.
--- drivers/input/serio/Kconfig | 9 ++ drivers/input/serio/Makefile | 1 + drivers/input/serio/altera_ps2.c | 185 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+), 0 deletions(-) create mode 100644 drivers/input/serio/altera_ps2.c
drivers/input/serio/Kconfig +9 -0
@@ -200,4 +200,13 @@ config SERIO_XILINX_XPS_PS2 To compile this driver as a module, choose M here: the module will be called xilinx_ps2. +config SERIO_ALTERA_PS2 + tristate "Altera UP PS/2 controller" + depends on EMBEDDED + help + Say Y here if you have Altera University Program PS/2 ports. + + To compile this driver as a module, choose M here: the + module will be called altera_ps2. + endif
drivers/input/serio/Makefile +1 -0
@@ -22,3 +22,4 @@ obj-$(CONFIG_SERIO_MACEPS2) += maceps2.o obj-$(CONFIG_SERIO_LIBPS2) += libps2.o obj-$(CONFIG_SERIO_RAW) += serio_raw.o obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o +obj-$(CONFIG_SERIO_ALTERA_PS2) += altera_ps2.o
drivers/input/serio/altera_ps2.c new file +185 -0
185 lines not on this page · raw message
Signature · 1 line
1.6.2.5
Dmitry Torokhov
maintainerHi Thomas,
Quoted 3 lines · Thomas Chou
This patch adds a new SERIO driver to support the Altera University Program PS/2 controller.
Thank you for the patch, it looks like it is reasonable written although it should do request_mem_region for the IO memory region it tries to remap and also IO addresses should not be cast to unsigned int but rather 'void __iomem *'. I also don;t see the reason for it to depend on EMBEDDED since the things that depend on EMBEDDED are usually features that are used almost by everyone and only in case of embedded arch you may want to turn them off to save some memory.
I also prefer even static functions to have the driver name as their prefix - this way if I see a backtrace I know exactly which module is involved.
I made a small patch on top of yours, please give it a try and if it did not break anything then I will fold it all together and queue for 2.6.33.
Thanks!
Signature · 13 lines
Dmitry Input: altera_ps2 - miscellaneous fixes From: Dmitry Torokhov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/input/serio/Kconfig | 1 drivers/input/serio/altera_ps2.c | 139 +++++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 63 deletions(-)
drivers/input/serio/Kconfig +0 -1
@@ -203,7 +203,6 @@ config SERIO_XILINX_XPS_PS2 config SERIO_ALTERA_PS2 tristate "Altera UP PS/2 controller" - depends on EMBEDDED help Say Y here if you have Altera University Program PS/2 ports.
drivers/input/serio/altera_ps2.c +77 -62
232 lines not on this page · raw message
Quoted 20 lines · Dmitry Torokhov
Hi Thomas,
Quoted 4 lines · Thomas Chou
This patch adds a new SERIO driver to support the Altera University Program PS/2 controller.
Thank you for the patch, it looks like it is reasonable written although it should do
request_mem_regionfor the IO memory region it tries to remap and also IO addresses should not be cast to unsigned int but rather 'void__iomem*'. I also don;t see the reason for it to depend on EMBEDDED since the things that depend on EMBEDDED are usually features that are used almost by everyone and only in case of embedded arch you may want to turn them off to save some memory.I also prefer even static functions to have the driver name as their prefix - this way if I see a backtrace I know exactly which module is involved.
Quoted 7 lines
I made a small patch on top of yours, please give it a try and if it did not break anything then I will fold it all together and queue for 2.6.33.
Thanks!
Hi Dmitry,
Thank you very much for your help. I have tested the updated driver with PS/2 keyboard and mouse on boards. They all worked well.
Cheers,
Thomas
Dmitry Torokhov
maintainerQuoted 25 lines · Thomas Chou
Quoted 24 lines · Dmitry Torokhov
Hi Thomas,
Quoted 4 lines · Thomas Chou
This patch adds a new SERIO driver to support the Altera University Program PS/2 controller.
Thank you for the patch, it looks like it is reasonable written although it should do
request_mem_regionfor the IO memory region it tries to remap and also IO addresses should not be cast to unsigned int but rather 'void__iomem*'. I also don;t see the reason for it to depend on EMBEDDED since the things that depend on EMBEDDED are usually features that are used almost by everyone and only in case of embedded arch you may want to turn them off to save some memory.I also prefer even static functions to have the driver name as their prefix - this way if I see a backtrace I know exactly which module is involved.
I made a small patch on top of yours, please give it a try and if it did not break anything then I will fold it all together and queue for 2.6.33.
Quoted 8 lines
Quoted 3 lines
Thanks!
Hi Dmitry,
Thank you very much for your help. I have tested the updated driver with PS/2 keyboard and mouse on boards. They all worked well.
Great, tahnk you for giving it a spin. I'll queue the driver for 2.6.33.
Signature · 1 line
Dmitry