Subversion Repositories shark

Rev

Rev 494 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1063 tullio 1
 
2
/*
3
 * This program is free software; you can redistribute it and/or modify
4
 * it under the terms of the GNU General Public License as published by
5
 * the Free Software Foundation; either version 2 of the License, or
6
 * (at your option) any later version.
7
 *
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 * GNU General Public License for more details.
12
 *
13
 * You should have received a copy of the GNU General Public License
14
 * along with this program; if not, write to the Free Software
15
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 *
17
 */
18
 
494 giacomo 19
#ifndef _PSMOUSE_H
20
#define _PSMOUSE_H
21
 
22
#define PSMOUSE_CMD_SETSCALE11  0x00e6
23
#define PSMOUSE_CMD_SETRES      0x10e8
24
#define PSMOUSE_CMD_GETINFO     0x03e9
25
#define PSMOUSE_CMD_SETSTREAM   0x00ea
26
#define PSMOUSE_CMD_POLL        0x03eb  
27
#define PSMOUSE_CMD_GETID       0x02f2
28
#define PSMOUSE_CMD_SETRATE     0x10f3
29
#define PSMOUSE_CMD_ENABLE      0x00f4
30
#define PSMOUSE_CMD_RESET_DIS   0x00f6
31
#define PSMOUSE_CMD_RESET_BAT   0x02ff
32
 
33
#define PSMOUSE_RET_BAT         0xaa
34
#define PSMOUSE_RET_ID          0x00
35
#define PSMOUSE_RET_ACK         0xfa
36
#define PSMOUSE_RET_NAK         0xfe
37
 
38
/* psmouse states */
39
#define PSMOUSE_NEW_DEVICE      0
40
#define PSMOUSE_ACTIVATED       1
41
#define PSMOUSE_IGNORE          2
42
 
43
struct psmouse {
44
        void *private;
45
        struct input_dev dev;
46
        struct serio *serio;
47
        char *vendor;
48
        char *name;
49
        unsigned char cmdbuf[8];
50
        unsigned char packet[8];
51
        unsigned char cmdcnt;
52
        unsigned char pktcnt;
53
        unsigned char type;
54
        unsigned char model;
55
        unsigned long last;
56
        unsigned char state;
57
        char acking;
58
        volatile char ack;
59
        char error;
60
        char devname[64];
61
        char phys[32];
62
};
63
 
64
#define PSMOUSE_PS2             1
65
#define PSMOUSE_PS2PP           2
66
#define PSMOUSE_PS2TPP          3
67
#define PSMOUSE_GENPS           4
68
#define PSMOUSE_IMPS            5
69
#define PSMOUSE_IMEX            6
70
#define PSMOUSE_SYNAPTICS       7
71
 
72
int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command);
73
 
74
extern int psmouse_smartscroll;
75
extern unsigned int psmouse_resetafter;
76
 
77
#endif /* _PSMOUSE_H */