Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ab308751
Commit
ab308751
authored
Jul 13, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This cset adds the Newton keyboard driver.
parent
b7786158
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
0 deletions
+159
-0
drivers/input/keyboard/Config.help
drivers/input/keyboard/Config.help
+8
-0
drivers/input/keyboard/Config.in
drivers/input/keyboard/Config.in
+1
-0
drivers/input/keyboard/Makefile
drivers/input/keyboard/Makefile
+1
-0
drivers/input/keyboard/newtonkbd.c
drivers/input/keyboard/newtonkbd.c
+149
-0
No files found.
drivers/input/keyboard/Config.help
View file @
ab308751
...
@@ -46,6 +46,14 @@ CONFIG_KEYBOARD_XTKBD
...
@@ -46,6 +46,14 @@ CONFIG_KEYBOARD_XTKBD
The module will be called xtkbd.o. If you want to compile it as a
The module will be called xtkbd.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_KEYBOARD_NEWTON
Say Y here if you have a Newton keyboard on a serial port.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called maple_keyb.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
CONFIG_KEYBOARD_MAPLE
CONFIG_KEYBOARD_MAPLE
Say Y here if you have a DreamCast console running Linux and have
Say Y here if you have a DreamCast console running Linux and have
a keyboard attached to its Maple bus.
a keyboard attached to its Maple bus.
...
...
drivers/input/keyboard/Config.in
View file @
ab308751
...
@@ -8,6 +8,7 @@ dep_tristate ' AT keyboard support' CONFIG_KEYBOARD_ATKBD $CONFIG_INPUT $CONFIG
...
@@ -8,6 +8,7 @@ dep_tristate ' AT keyboard support' CONFIG_KEYBOARD_ATKBD $CONFIG_INPUT $CONFIG
dep_tristate ' Sun Type 4 and Type 5 keyboard support' CONFIG_KEYBOARD_SUNKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' Sun Type 4 and Type 5 keyboard support' CONFIG_KEYBOARD_SUNKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' PS/2 to Serial converter support' CONFIG_KEYBOARD_PS2SERKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' PS/2 to Serial converter support' CONFIG_KEYBOARD_PS2SERKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' XT Keyboard support' CONFIG_KEYBOARD_XTKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' XT Keyboard support' CONFIG_KEYBOARD_XTKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
dep_tristate ' Newton keyboard' CONFIG_KEYBOARD_NEWTON $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
dep_tristate ' Maple bus keyboard support' CONFIG_KEYBOARD_MAPLE $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_MAPLE
dep_tristate ' Maple bus keyboard support' CONFIG_KEYBOARD_MAPLE $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_MAPLE
...
...
drivers/input/keyboard/Makefile
View file @
ab308751
...
@@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_PS2SERKBD) += ps2serkbd.o
...
@@ -10,6 +10,7 @@ obj-$(CONFIG_KEYBOARD_PS2SERKBD) += ps2serkbd.o
obj-$(CONFIG_KEYBOARD_SUNKBD)
+=
sunkbd.o
obj-$(CONFIG_KEYBOARD_SUNKBD)
+=
sunkbd.o
obj-$(CONFIG_KEYBOARD_XTKBD)
+=
xtkbd.o
obj-$(CONFIG_KEYBOARD_XTKBD)
+=
xtkbd.o
obj-$(CONFIG_KEYBOARD_AMIGA)
+=
amikbd.o
obj-$(CONFIG_KEYBOARD_AMIGA)
+=
amikbd.o
obj-$(CONFIG_KEYBOARD_NEWTON)
+=
newtonkbd.o
# The global Rules.make.
# The global Rules.make.
...
...
drivers/input/keyboard/newtonkbd.c
0 → 100644
View file @
ab308751
/*
* Copyright (c) 2000 Justin Cormack
*/
/*
* Newton keyboard driver for Linux
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <j.cormack@doc.ic.ac.uk>, or by paper mail:
* Justin Cormack, 68 Dartmouth Park Road, London NW5 1SN, UK.
*/
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/serio.h>
MODULE_AUTHOR
(
"Justin Cormack <j.cormack@doc.ic.ac.uk>"
);
#define NKBD_KEY 0x7f
#define NKBD_PRESS 0x80
static
unsigned
char
nkbd_keycode
[
128
]
=
{
KEY_A
,
KEY_S
,
KEY_D
,
KEY_F
,
KEY_H
,
KEY_G
,
KEY_Z
,
KEY_X
,
KEY_C
,
KEY_V
,
0
,
KEY_B
,
KEY_Q
,
KEY_W
,
KEY_E
,
KEY_R
,
KEY_Y
,
KEY_T
,
KEY_1
,
KEY_2
,
KEY_3
,
KEY_4
,
KEY_6
,
KEY_5
,
KEY_EQUAL
,
KEY_9
,
KEY_7
,
KEY_MINUS
,
KEY_8
,
KEY_0
,
KEY_RIGHTBRACE
,
KEY_O
,
KEY_U
,
KEY_LEFTBRACE
,
KEY_I
,
KEY_P
,
KEY_ENTER
,
KEY_L
,
KEY_J
,
KEY_APOSTROPHE
,
KEY_K
,
KEY_SEMICOLON
,
KEY_BACKSLASH
,
KEY_COMMA
,
KEY_SLASH
,
KEY_N
,
KEY_M
,
KEY_DOT
,
KEY_TAB
,
KEY_SPACE
,
KEY_GRAVE
,
KEY_DELETE
,
0
,
0
,
0
,
KEY_LEFTMETA
,
KEY_LEFTSHIFT
,
KEY_CAPSLOCK
,
KEY_LEFTALT
,
KEY_LEFTCTRL
,
KEY_RIGHTSHIFT
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
KEY_LEFT
,
KEY_RIGHT
,
KEY_DOWN
,
KEY_UP
,
0
};
static
char
*
nkbd_name
=
"Newton Keyboard"
;
struct
nkbd
{
unsigned
char
keycode
[
128
];
struct
input_dev
dev
;
struct
serio
*
serio
;
char
phys
[
32
];
};
void
nkbd_interrupt
(
struct
serio
*
serio
,
unsigned
char
data
,
unsigned
int
flags
)
{
struct
nkbd
*
nkbd
=
serio
->
private
;
/* invalid scan codes are probably the init sequence, so we ignore them */
if
(
nkbd
->
keycode
[
data
&
NKBD_KEY
])
input_report_key
(
&
nkbd
->
dev
,
nkbd
->
keycode
[
data
&
NKBD_KEY
],
data
&
NKBD_PRESS
);
else
if
(
data
==
0xe7
)
/* end of init sequence */
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
nkbd_name
,
serio
->
phys
);
}
void
nkbd_connect
(
struct
serio
*
serio
,
struct
serio_dev
*
dev
)
{
struct
nkbd
*
nkbd
;
int
i
;
if
(
serio
->
type
!=
(
SERIO_RS232
|
SERIO_NEWTON
))
return
;
if
(
!
(
nkbd
=
kmalloc
(
sizeof
(
struct
nkbd
),
GFP_KERNEL
)))
return
;
memset
(
nkbd
,
0
,
sizeof
(
struct
nkbd
));
nkbd
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
nkbd
->
serio
=
serio
;
nkbd
->
dev
.
keycode
=
nkbd
->
keycode
;
nkbd
->
dev
.
private
=
nkbd
;
serio
->
private
=
nkbd
;
if
(
serio_open
(
serio
,
dev
))
{
kfree
(
nkbd
);
return
;
}
memcpy
(
nkbd
->
keycode
,
nkbd_keycode
,
sizeof
(
nkbd
->
keycode
));
for
(
i
=
0
;
i
<
128
;
i
++
)
set_bit
(
nkbd
->
keycode
[
i
],
nkbd
->
dev
.
keybit
);
clear_bit
(
0
,
nkbd
->
dev
.
keybit
);
sprintf
(
nkbd
->
phys
,
"%s/input0"
,
serio
->
phys
);
nkbd
->
dev
.
name
=
nkbd_name
;
nkbd
->
dev
.
phys
=
nkbd
->
phys
;
nkbd
->
dev
.
idbus
=
BUS_RS232
;
nkbd
->
dev
.
idvendor
=
SERIO_NEWTON
;
nkbd
->
dev
.
idproduct
=
0x0001
;
nkbd
->
dev
.
idversion
=
0x0100
;
input_register_device
(
&
nkbd
->
dev
);
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
nkbd_name
,
serio
->
phys
);
}
void
nkbd_disconnect
(
struct
serio
*
serio
)
{
struct
nkbd
*
nkbd
=
serio
->
private
;
input_unregister_device
(
&
nkbd
->
dev
);
serio_close
(
serio
);
kfree
(
nkbd
);
}
struct
serio_dev
nkbd_dev
=
{
interrupt:
nkbd_interrupt
,
connect:
nkbd_connect
,
disconnect:
nkbd_disconnect
};
int
__init
nkbd_init
(
void
)
{
serio_register_device
(
&
nkbd_dev
);
return
0
;
}
void
__exit
nkbd_exit
(
void
)
{
serio_unregister_device
(
&
nkbd_dev
);
}
module_init
(
nkbd_init
);
module_exit
(
nkbd_exit
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment