Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xorg
driver
xf86-input-synaptics
Commits
90377b8c
Commit
90377b8c
authored
Jul 30, 2004
by
Peter Osterlund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use generic ps2 functions in alpscomm.c instead of synaptics
specific functions.
parent
f40f3d45
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
32 deletions
+32
-32
alpscomm.c
alpscomm.c
+6
-5
ps2comm.c
ps2comm.c
+3
-25
ps2comm.h
ps2comm.h
+23
-2
No files found.
alpscomm.c
View file @
90377b8c
...
...
@@ -30,11 +30,12 @@
static
void
ALPS_initialize
(
int
fd
)
{
ps2_synaptics_disable_device
(
fd
);
ps2_synaptics_disable_device
(
fd
);
ps2_synaptics_disable_device
(
fd
);
ps2_synaptics_disable_device
(
fd
);
ps2_synaptics_enable_device
(
fd
);
xf86FlushInput
(
fd
);
ps2_putbyte
(
fd
,
PS2_CMD_DISABLE
);
ps2_putbyte
(
fd
,
PS2_CMD_DISABLE
);
ps2_putbyte
(
fd
,
PS2_CMD_DISABLE
);
ps2_putbyte
(
fd
,
PS2_CMD_DISABLE
);
ps2_putbyte
(
fd
,
PS2_CMD_ENABLE
);
}
static
void
...
...
ps2comm.c
View file @
90377b8c
...
...
@@ -32,28 +32,6 @@
#define MAX_UNSYNC_PACKETS 10
/* i.e. 10 to 60 bytes */
/* acknowledge for commands and parameter */
#define PS2_ACK 0xFA
#define PS2_ERROR 0xFC
/* standard PS/2 commands */
#define PS2_CMD_RESET 0xFF
#define PS2_CMD_RESEND 0xFE
#define PS2_CMD_SET_DEFAULT 0xF6
#define PS2_CMD_DISABLE 0xF5
#define PS2_CMD_ENABLE 0xF4
#define PS2_CMD_SET_SAMPLE_RATE 0xF3
#define PS2_CMD_READ_DEVICE_TYPE 0xF2
#define PS2_CMD_SET_REMOTE_MODE 0xF0
#define PS2_CMD_SET_WRAP_MODE 0xEE
#define PS2_CMD_RESET_WRAP_MODE 0xEC
#define PS2_CMD_READ_DATA 0xEB
#define PS2_CMD_SET_STREAM_MODE 0xEA
#define PS2_CMD_STATUS_REQUEST 0xE9
#define PS2_CMD_SET_RESOLUTION 0xE8
#define PS2_CMD_SET_SCALING_2_1 0xE7
#define PS2_CMD_SET_SCALING_1_1 0xE6
/* synaptics queries */
#define SYN_QUE_IDENTIFY 0x00
#define SYN_QUE_MODES 0x01
...
...
@@ -108,7 +86,7 @@ ps2_getbyte(int fd, byte *b)
/*
* Write a byte to the ps/2 port, wait for ACK
*/
static
Bool
Bool
ps2_putbyte
(
int
fd
,
byte
b
)
{
byte
ack
;
...
...
@@ -380,13 +358,13 @@ ps2_synaptics_identify(int fd, struct SynapticsHwInfo *synhw)
return
FALSE
;
}
Bool
static
Bool
ps2_synaptics_enable_device
(
int
fd
)
{
return
ps2_putbyte
(
fd
,
PS2_CMD_ENABLE
);
}
Bool
static
Bool
ps2_synaptics_disable_device
(
int
fd
)
{
xf86FlushInput
(
fd
);
...
...
ps2comm.h
View file @
90377b8c
...
...
@@ -4,6 +4,28 @@
#include <sys/ioctl.h>
#include "xf86_OSproc.h"
/* acknowledge for commands and parameter */
#define PS2_ACK 0xFA
#define PS2_ERROR 0xFC
/* standard PS/2 commands */
#define PS2_CMD_RESET 0xFF
#define PS2_CMD_RESEND 0xFE
#define PS2_CMD_SET_DEFAULT 0xF6
#define PS2_CMD_DISABLE 0xF5
#define PS2_CMD_ENABLE 0xF4
#define PS2_CMD_SET_SAMPLE_RATE 0xF3
#define PS2_CMD_READ_DEVICE_TYPE 0xF2
#define PS2_CMD_SET_REMOTE_MODE 0xF0
#define PS2_CMD_SET_WRAP_MODE 0xEE
#define PS2_CMD_RESET_WRAP_MODE 0xEC
#define PS2_CMD_READ_DATA 0xEB
#define PS2_CMD_SET_STREAM_MODE 0xEA
#define PS2_CMD_STATUS_REQUEST 0xE9
#define PS2_CMD_SET_RESOLUTION 0xE8
#define PS2_CMD_SET_SCALING_2_1 0xE7
#define PS2_CMD_SET_SCALING_1_1 0xE6
/* synatics modes */
#define SYN_BIT_ABSOLUTE_MODE (1 << 7)
#define SYN_BIT_HIGH_RATE (1 << 6)
...
...
@@ -51,8 +73,7 @@
typedef
unsigned
char
byte
;
Bool
ps2_synaptics_enable_device
(
int
fd
);
Bool
ps2_synaptics_disable_device
(
int
fd
);
Bool
ps2_putbyte
(
int
fd
,
byte
b
);
struct
SynapticsHwInfo
;
void
ps2_print_ident
(
const
struct
SynapticsHwInfo
*
synhw
);
...
...
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