Commit c98d5e01 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] PS/2 support for PARISC

This converts the PA-RISC PS/2 keyboard & mouse driver to the input
layer.  New driver written by Laurent Canet & Thibaut Varene.
parent e80f40a9
...@@ -11,7 +11,7 @@ endif ...@@ -11,7 +11,7 @@ endif
AFLAGS_entry.o := -traditional AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional AFLAGS_pacache.o := -traditional
export-objs := parisc_ksyms.o keyboard.o export-objs := parisc_ksyms.o
obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
...@@ -22,7 +22,6 @@ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ ...@@ -22,7 +22,6 @@ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PA11) += pci-dma.o obj-$(CONFIG_PA11) += pci-dma.o
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_VT) += keyboard.o
obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \ obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \
ioctl32.o signal32.o ioctl32.o signal32.o
# only supported for PCX-W/U in 64-bit mode at the moment # only supported for PCX-W/U in 64-bit mode at the moment
......
/*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
* ---------------------------------------------------------------
* This source file will be removed as soon as we have converted
* hp_psaux.c and hp_keyb.c to the input layer !
*
*/
/*
* linux/arch/parisc/kernel/keyboard.c
*
* Alex deVries <adevries@thepuffingroup.com>
* Copyright (1999) The Puffin Group
* Mostly rewritten by Philipp Rumpf <prumpf@tux.org>
* Copyright 2000 Philipp Rumpf
*/
#include <linux/errno.h>
#include <linux/keyboard.h>
#include <asm/keyboard.h>
#include <linux/module.h>
static int def_setkeycode(unsigned int x, unsigned int y)
{
return 0;
}
static int def_getkeycode(unsigned int x)
{
return 0;
}
static int def_translate(unsigned char scancode, unsigned char *keycode,
char raw)
{
*keycode = scancode;
return 1;
}
static char def_unexpected_up(unsigned char c)
{
return 128;
}
static void def_leds(unsigned char leds)
{
}
static void def_init_hw(void)
{
}
static char def_sysrq_xlate[NR_KEYS];
#define DEFAULT_KEYB_OPS \
.setkeycode = def_setkeycode, \
.getkeycode = def_getkeycode, \
.translate = def_translate, \
.unexpected_up = def_unexpected_up, \
.leds = def_leds, \
.init_hw = def_init_hw, \
.sysrq_key = 0xff, \
.sysrq_xlate = def_sysrq_xlate,
static struct kbd_ops def_kbd_ops = {
DEFAULT_KEYB_OPS
};
struct kbd_ops *kbd_ops = &def_kbd_ops;
void unregister_kbd_ops(void)
{
struct kbd_ops new_kbd_ops = { DEFAULT_KEYB_OPS };
register_kbd_ops(&new_kbd_ops);
}
EXPORT_SYMBOL(unregister_kbd_ops);
void register_kbd_ops(struct kbd_ops *ops)
{
if(ops->setkeycode)
kbd_ops->setkeycode = ops->setkeycode;
if(ops->getkeycode)
kbd_ops->getkeycode = ops->getkeycode;
if(ops->translate)
kbd_ops->translate = ops->translate;
if(ops->unexpected_up)
kbd_ops->unexpected_up = ops->unexpected_up;
if(ops->leds)
kbd_ops->leds = ops->leds;
if(ops->init_hw)
kbd_ops->init_hw = ops->init_hw;
kbd_ops->sysrq_key = ops->sysrq_key;
kbd_ops->sysrq_xlate = ops->sysrq_xlate;
}
This diff is collapsed.
This diff is collapsed.
...@@ -56,3 +56,12 @@ config INPUT_UINPUT ...@@ -56,3 +56,12 @@ config INPUT_UINPUT
The module will be called uinput.o. If you want to compile it as a The module will be called uinput.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>. module, say M here and read <file:Documentation/modules.txt>.
config INPUT_GSC
tristate "PA-RISC GSC PS/2 keyboard/mouse support"
depends on GSC && INPUT && INPUT_MISC
help
Say Y here if you have a PS/2 keyboard and/or mouse attached
to your PA-RISC box. HP run the keyboard in AT mode rather than
XT mode like everyone else, so we need our own driver.
Furthermore, the GSC PS/2 controller shares IRQ between mouse and
keyboard.
...@@ -8,7 +8,4 @@ obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o ...@@ -8,7 +8,4 @@ obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o
obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o
obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o
obj-$(CONFIG_INPUT_UINPUT) += uinput.o obj-$(CONFIG_INPUT_UINPUT) += uinput.o
obj-$(CONFIG_INPUT_GSC) += gsc_ps2.o
# The global Rules.make.
include $(TOPDIR)/Rules.make
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment