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
7e65788c
Commit
7e65788c
authored
Jul 10, 2003
by
Matthew Wilcox
Committed by
Linus Torvalds
Jul 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] gsc-ps2 update
Update gsc_ps2 for recent changes.
parent
46c7cd8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
drivers/input/misc/gsc_ps2.c
drivers/input/misc/gsc_ps2.c
+16
-6
No files found.
drivers/input/misc/gsc_ps2.c
View file @
7e65788c
...
@@ -56,12 +56,13 @@
...
@@ -56,12 +56,13 @@
#include <linux/sched.h>
/* for request_irq/free_irq */
#include <linux/sched.h>
/* for request_irq/free_irq */
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/pc_keyb.h>
#include <linux/ioport.h>
#include <linux/ioport.h>
#include <linux/kd.h>
#include <linux/kd.h>
#include <linux/pci_ids.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/parisc-device.h>
/* Debugging stuff */
/* Debugging stuff */
#undef KBD_DEBUG
#undef KBD_DEBUG
...
@@ -79,6 +80,7 @@
...
@@ -79,6 +80,7 @@
/* PS/2 keyboard and mouse constants */
/* PS/2 keyboard and mouse constants */
#define AUX_RECONNECT 0xAA
/* PS/2 Mouse end of test successful */
#define AUX_RECONNECT 0xAA
/* PS/2 Mouse end of test successful */
#define AUX_REPLY_ACK 0xFA
#define AUX_REPLY_ACK 0xFA
#define AUX_ENABLE_DEV 0xF4
/* Enables aux device */
/* Order of the mouse bytes coming to the host */
/* Order of the mouse bytes coming to the host */
#define PACKET_X 1
#define PACKET_X 1
...
@@ -131,6 +133,12 @@
...
@@ -131,6 +133,12 @@
#define MOUSE_XOVFLOW 0x40
#define MOUSE_XOVFLOW 0x40
#define MOUSE_YOVFLOW 0x80
#define MOUSE_YOVFLOW 0x80
/* Remnant of pc_keyb.h */
#define KBD_CMD_SET_LEDS 0xED
/* Sets keyboard leds */
#define KBD_CMD_SET_RATE 0xF3
/* Sets typematic rate */
#define KBD_CMD_ENABLE 0xF4
/* Enables scanning */
#define KBD_CMD_DISABLE 0xF5
#define KBD_CMD_RESET 0xFF
static
unsigned
char
hpkeyb_keycode
[
KBD_TBLSIZE
]
=
static
unsigned
char
hpkeyb_keycode
[
KBD_TBLSIZE
]
=
{
{
...
@@ -341,7 +349,7 @@ static void gscps2_kbd_docode(struct pt_regs *regs)
...
@@ -341,7 +349,7 @@ static void gscps2_kbd_docode(struct pt_regs *regs)
default:
default:
hpkeyb
.
scancode
=
scancode
;
hpkeyb
.
scancode
=
scancode
;
DPRINTK
(
"sent=%d, rel=%d
\n
"
,
hpkeyb
.
scancode
,
hpkeyb
.
released
);
DPRINTK
(
"sent=%d, rel=%d
\n
"
,
hpkeyb
.
scancode
,
hpkeyb
.
released
);
input_regs
(
regs
);
/*input_regs(regs);*/
input_report_key
(
&
hpkeyb
.
dev
,
hpkeyb_keycode
[
hpkeyb
.
scancode
],
!
hpkeyb
.
released
);
input_report_key
(
&
hpkeyb
.
dev
,
hpkeyb_keycode
[
hpkeyb
.
scancode
],
!
hpkeyb
.
released
);
input_sync
(
&
hpkeyb
.
dev
);
input_sync
(
&
hpkeyb
.
dev
);
if
(
hpkeyb
.
escaped
)
if
(
hpkeyb
.
escaped
)
...
@@ -388,7 +396,7 @@ static void gscps2_mouse_docode(struct pt_regs *regs)
...
@@ -388,7 +396,7 @@ static void gscps2_mouse_docode(struct pt_regs *regs)
if
((
hpmouse
.
bytes
[
PACKET_CTRL
]
&
(
MOUSE_XOVFLOW
|
MOUSE_YOVFLOW
)))
if
((
hpmouse
.
bytes
[
PACKET_CTRL
]
&
(
MOUSE_XOVFLOW
|
MOUSE_YOVFLOW
)))
DPRINTK
(
"Mouse: position overflow
\n
"
);
DPRINTK
(
"Mouse: position overflow
\n
"
);
input_regs
(
regs
);
/*input_regs(regs);*/
input_report_key
(
&
hpmouse
.
dev
,
BTN_LEFT
,
hpmouse
.
bytes
[
PACKET_CTRL
]
&
MOUSE_LEFTBTN
);
input_report_key
(
&
hpmouse
.
dev
,
BTN_LEFT
,
hpmouse
.
bytes
[
PACKET_CTRL
]
&
MOUSE_LEFTBTN
);
input_report_key
(
&
hpmouse
.
dev
,
BTN_MIDDLE
,
hpmouse
.
bytes
[
PACKET_CTRL
]
&
MOUSE_MIDBTN
);
input_report_key
(
&
hpmouse
.
dev
,
BTN_MIDDLE
,
hpmouse
.
bytes
[
PACKET_CTRL
]
&
MOUSE_MIDBTN
);
...
@@ -420,7 +428,7 @@ static void gscps2_mouse_docode(struct pt_regs *regs)
...
@@ -420,7 +428,7 @@ static void gscps2_mouse_docode(struct pt_regs *regs)
* key value to the system.
* key value to the system.
*/
*/
static
void
gscps2_interrupt
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
reg
)
static
irqreturn_t
gscps2_interrupt
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
reg
)
{
{
/* process mouse actions */
/* process mouse actions */
while
(
gscps2_readb_status
(
hpmouse
.
addr
)
&
GSC_STAT_RBNE
)
while
(
gscps2_readb_status
(
hpmouse
.
addr
)
&
GSC_STAT_RBNE
)
...
@@ -429,6 +437,8 @@ static void gscps2_interrupt(int irq, void *dev, struct pt_regs *reg)
...
@@ -429,6 +437,8 @@ static void gscps2_interrupt(int irq, void *dev, struct pt_regs *reg)
/* process keyboard scancode */
/* process keyboard scancode */
while
(
gscps2_readb_status
(
hpkeyb
.
addr
)
&
GSC_STAT_RBNE
)
while
(
gscps2_readb_status
(
hpkeyb
.
addr
)
&
GSC_STAT_RBNE
)
gscps2_kbd_docode
(
reg
);
gscps2_kbd_docode
(
reg
);
return
IRQ_HANDLED
;
}
}
...
@@ -525,7 +535,7 @@ static int __init gscps2_kbd_probe(void)
...
@@ -525,7 +535,7 @@ static int __init gscps2_kbd_probe(void)
/* TODO These need some adjustement, are they really useful ? */
/* TODO These need some adjustement, are they really useful ? */
hpkeyb
.
dev
.
id
.
bustype
=
BUS_GSC
;
hpkeyb
.
dev
.
id
.
bustype
=
BUS_GSC
;
hpkeyb
.
dev
.
id
.
vendor
=
0x0001
;
hpkeyb
.
dev
.
id
.
vendor
=
PCI_VENDOR_ID_HP
;
hpkeyb
.
dev
.
id
.
product
=
0x0001
;
hpkeyb
.
dev
.
id
.
product
=
0x0001
;
hpkeyb
.
dev
.
id
.
version
=
0x0010
;
hpkeyb
.
dev
.
id
.
version
=
0x0010
;
hpkeyb
.
initialized
=
1
;
hpkeyb
.
initialized
=
1
;
...
@@ -580,7 +590,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
...
@@ -580,7 +590,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
{
{
u8
id
;
u8
id
;
char
*
addr
,
*
name
;
char
*
addr
,
*
name
;
int
ret
,
device_found
=
0
;
int
ret
=
0
,
device_found
=
0
;
unsigned
long
hpa
=
dev
->
hpa
;
unsigned
long
hpa
=
dev
->
hpa
;
if
(
!
dev
->
irq
)
if
(
!
dev
->
irq
)
...
...
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