aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@debian.org>2007-03-10 01:39:54 -0500
committerDmitry Torokhov <dtor@insightbb.com>2007-03-10 01:39:54 -0500
commit55e3d9224b60df0fd2dc36bff9b538ce40fd9586 (patch)
tree7a8df6e8996bc1c4e73705750df3b0854e998897
parentcb9def4dff9fe7e3d3114eba4e2d89f52265e22c (diff)
Input: psmouse - allow disabing certain protocol extensions
Allow ALPS, LOGIPS2PP, LIFEBOOK, TRACKPOINT and TOUCHKIT protocol extensions of psmouse to be disabled during compilation. This will allow users save some memory when they are sure that they will only use a certain type of mice. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/mouse/Kconfig61
-rw-r--r--drivers/input/mouse/Makefile9
-rw-r--r--drivers/input/mouse/alps.h17
-rw-r--r--drivers/input/mouse/lifebook.h11
-rw-r--r--drivers/input/mouse/logips2pp.h7
-rw-r--r--drivers/input/mouse/psmouse-base.c16
-rw-r--r--drivers/input/mouse/synaptics.c99
-rw-r--r--drivers/input/mouse/synaptics.h18
-rw-r--r--drivers/input/mouse/touchkit_ps2.h7
-rw-r--r--drivers/input/mouse/trackpoint.h9
10 files changed, 195 insertions, 59 deletions
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 35d998c3e578..d0d074457936 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -37,6 +37,65 @@ config MOUSE_PS2
37 To compile this driver as a module, choose M here: the 37 To compile this driver as a module, choose M here: the
38 module will be called psmouse. 38 module will be called psmouse.
39 39
40config MOUSE_PS2_ALPS
41 bool "ALPS PS/2 mouse protocol extension" if EMBEDDED
42 default y
43 depends on MOUSE_PS2
44 ---help---
45 Say Y here if you have an ALPS PS/2 touchpad connected to
46 your system.
47
48 If unsure, say Y.
49
50config MOUSE_PS2_LOGIPS2PP
51 bool "Logictech PS/2++ mouse protocol extension" if EMBEDDED
52 default y
53 depends on MOUSE_PS2
54 ---help---
55 Say Y here if you have a Logictech PS/2++ mouse connected to
56 your system.
57
58 If unsure, say Y.
59
60config MOUSE_PS2_SYNAPTICS
61 bool "Synaptics PS/2 mouse protocol extension" if EMBEDDED
62 default y
63 depends on MOUSE_PS2
64 ---help---
65 Say Y here if you have a Synaptics PS/2 TouchPad connected to
66 your system.
67
68 If unsure, say Y.
69
70config MOUSE_PS2_LIFEBOOK
71 bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EMBEDDED
72 default y
73 depends on MOUSE_PS2
74 ---help---
75 Say Y here if you have a Fujitsu B-series Lifebook PS/2
76 TouchScreen connected to your system.
77
78 If unsure, say Y.
79
80config MOUSE_PS2_TRACKPOINT
81 bool "IBM Trackpoint PS/2 mouse protocol extension" if EMBEDDED
82 default y
83 depends on MOUSE_PS2
84 ---help---
85 Say Y here if you have an IBM Trackpoint PS/2 mouse connected
86 to your system.
87
88 If unsure, say Y.
89
90config MOUSE_PS2_TOUCHKIT
91 bool "eGalax TouchKit PS/2 protocol extension"
92 depends on MOUSE_PS2
93 ---help---
94 Say Y here if you have an eGalax TouchKit PS/2 touchscreen
95 connected to your system.
96
97 If unsure, say N.
98
40config MOUSE_SERIAL 99config MOUSE_SERIAL
41 tristate "Serial mouse" 100 tristate "Serial mouse"
42 select SERIO 101 select SERIO
@@ -118,7 +177,7 @@ config MOUSE_VSXXXAA
118 digitizer (VSXXX-AB) DEC produced. 177 digitizer (VSXXX-AB) DEC produced.
119 178
120config MOUSE_HIL 179config MOUSE_HIL
121 tristate "HIL pointers (mice etc)." 180 tristate "HIL pointers (mice etc)."
122 depends on GSC || HP300 181 depends on GSC || HP300
123 select HP_SDC 182 select HP_SDC
124 select HIL_MLC 183 select HIL_MLC
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index 6751179baeb8..83477d5c7664 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -14,5 +14,10 @@ obj-$(CONFIG_MOUSE_SERIAL) += sermouse.o
14obj-$(CONFIG_MOUSE_HIL) += hil_ptr.o 14obj-$(CONFIG_MOUSE_HIL) += hil_ptr.o
15obj-$(CONFIG_MOUSE_VSXXXAA) += vsxxxaa.o 15obj-$(CONFIG_MOUSE_VSXXXAA) += vsxxxaa.o
16 16
17psmouse-objs := psmouse-base.o alps.o logips2pp.o synaptics.o lifebook.o \ 17psmouse-objs := psmouse-base.o synaptics.o
18 trackpoint.o touchkit_ps2.o 18
19psmouse-$(CONFIG_MOUSE_PS2_ALPS) += alps.o
20psmouse-$(CONFIG_MOUSE_PS2_LOGIPS2PP) += logips2pp.o
21psmouse-$(CONFIG_MOUSE_PS2_LIFEBOOK) += lifebook.o
22psmouse-$(CONFIG_MOUSE_PS2_TRACKPOINT) += trackpoint.o
23psmouse-$(CONFIG_MOUSE_PS2_TOUCHKIT) += touchkit_ps2.o
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index 69db7325a494..f85ac40ec941 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -12,9 +12,6 @@
12#ifndef _ALPS_H 12#ifndef _ALPS_H
13#define _ALPS_H 13#define _ALPS_H
14 14
15int alps_detect(struct psmouse *psmouse, int set_properties);
16int alps_init(struct psmouse *psmouse);
17
18struct alps_model_info { 15struct alps_model_info {
19 unsigned char signature[3]; 16 unsigned char signature[3];
20 unsigned char byte0, mask0; 17 unsigned char byte0, mask0;
@@ -29,4 +26,18 @@ struct alps_data {
29 int prev_fin; /* Finger bit from previous packet */ 26 int prev_fin; /* Finger bit from previous packet */
30}; 27};
31 28
29#ifdef CONFIG_MOUSE_PS2_ALPS
30int alps_detect(struct psmouse *psmouse, int set_properties);
31int alps_init(struct psmouse *psmouse);
32#else
33inline int alps_detect(struct psmouse *psmouse, int set_properties)
34{
35 return -ENOSYS;
36}
37inline int alps_init(struct psmouse *psmouse)
38{
39 return -ENOSYS;
40}
41#endif /* CONFIG_MOUSE_PS2_ALPS */
42
32#endif 43#endif
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
index be1c0943825d..c1647cf036c2 100644
--- a/drivers/input/mouse/lifebook.h
+++ b/drivers/input/mouse/lifebook.h
@@ -11,7 +11,18 @@
11#ifndef _LIFEBOOK_H 11#ifndef _LIFEBOOK_H
12#define _LIFEBOOK_H 12#define _LIFEBOOK_H
13 13
14#ifdef CONFIG_MOUSE_PS2_LIFEBOOK
14int lifebook_detect(struct psmouse *psmouse, int set_properties); 15int lifebook_detect(struct psmouse *psmouse, int set_properties);
15int lifebook_init(struct psmouse *psmouse); 16int lifebook_init(struct psmouse *psmouse);
17#else
18inline int lifebook_detect(struct psmouse *psmouse, int set_properties)
19{
20 return -ENOSYS;
21}
22inline int lifebook_init(struct psmouse *psmouse)
23{
24 return -ENOSYS;
25}
26#endif
16 27
17#endif 28#endif
diff --git a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h
index 64a8ec52ea6d..6e5712525fd6 100644
--- a/drivers/input/mouse/logips2pp.h
+++ b/drivers/input/mouse/logips2pp.h
@@ -11,6 +11,13 @@
11#ifndef _LOGIPS2PP_H 11#ifndef _LOGIPS2PP_H
12#define _LOGIPS2PP_H 12#define _LOGIPS2PP_H
13 13
14#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
14int ps2pp_init(struct psmouse *psmouse, int set_properties); 15int ps2pp_init(struct psmouse *psmouse, int set_properties);
16#else
17inline int ps2pp_init(struct psmouse *psmouse, int set_properties)
18{
19 return -ENOSYS;
20}
21#endif /* CONFIG_MOUSE_PS2_LOGIPS2PP */
15 22
16#endif 23#endif
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 33a3251e0766..e6c9e7bb1f99 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -570,7 +570,9 @@ static int psmouse_extensions(struct psmouse *psmouse,
570 return PSMOUSE_THINKPS; 570 return PSMOUSE_THINKPS;
571 571
572/* 572/*
573 * Try Synaptics TouchPad 573 * Try Synaptics TouchPad. Note that probing is done even if Synaptics protocol
574 * support is disabled in config - we need to know if it is synaptics so we
575 * can reset it properly after probing for intellimouse.
574 */ 576 */
575 if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse, set_properties) == 0) { 577 if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse, set_properties) == 0) {
576 synaptics_hardware = 1; 578 synaptics_hardware = 1;
@@ -661,12 +663,14 @@ static const struct psmouse_protocol psmouse_protocols[] = {
661 .maxproto = 1, 663 .maxproto = 1,
662 .detect = ps2bare_detect, 664 .detect = ps2bare_detect,
663 }, 665 },
666#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
664 { 667 {
665 .type = PSMOUSE_PS2PP, 668 .type = PSMOUSE_PS2PP,
666 .name = "PS2++", 669 .name = "PS2++",
667 .alias = "logitech", 670 .alias = "logitech",
668 .detect = ps2pp_init, 671 .detect = ps2pp_init,
669 }, 672 },
673#endif
670 { 674 {
671 .type = PSMOUSE_THINKPS, 675 .type = PSMOUSE_THINKPS,
672 .name = "ThinkPS/2", 676 .name = "ThinkPS/2",
@@ -693,6 +697,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
693 .maxproto = 1, 697 .maxproto = 1,
694 .detect = im_explorer_detect, 698 .detect = im_explorer_detect,
695 }, 699 },
700#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
696 { 701 {
697 .type = PSMOUSE_SYNAPTICS, 702 .type = PSMOUSE_SYNAPTICS,
698 .name = "SynPS/2", 703 .name = "SynPS/2",
@@ -700,6 +705,8 @@ static const struct psmouse_protocol psmouse_protocols[] = {
700 .detect = synaptics_detect, 705 .detect = synaptics_detect,
701 .init = synaptics_init, 706 .init = synaptics_init,
702 }, 707 },
708#endif
709#ifdef CONFIG_MOUSE_PS2_ALPS
703 { 710 {
704 .type = PSMOUSE_ALPS, 711 .type = PSMOUSE_ALPS,
705 .name = "AlpsPS/2", 712 .name = "AlpsPS/2",
@@ -707,24 +714,31 @@ static const struct psmouse_protocol psmouse_protocols[] = {
707 .detect = alps_detect, 714 .detect = alps_detect,
708 .init = alps_init, 715 .init = alps_init,
709 }, 716 },
717#endif
718#ifdef CONFIG_MOUSE_PS2_LIFEBOOK
710 { 719 {
711 .type = PSMOUSE_LIFEBOOK, 720 .type = PSMOUSE_LIFEBOOK,
712 .name = "LBPS/2", 721 .name = "LBPS/2",
713 .alias = "lifebook", 722 .alias = "lifebook",
714 .init = lifebook_init, 723 .init = lifebook_init,
715 }, 724 },
725#endif
726#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
716 { 727 {
717 .type = PSMOUSE_TRACKPOINT, 728 .type = PSMOUSE_TRACKPOINT,
718 .name = "TPPS/2", 729 .name = "TPPS/2",
719 .alias = "trackpoint", 730 .alias = "trackpoint",
720 .detect = trackpoint_detect, 731 .detect = trackpoint_detect,
721 }, 732 },
733#endif
734#ifdef CONFIG_MOUSE_PS2_TOUCHKIT
722 { 735 {
723 .type = PSMOUSE_TOUCHKIT_PS2, 736 .type = PSMOUSE_TOUCHKIT_PS2,
724 .name = "touchkitPS/2", 737 .name = "touchkitPS/2",
725 .alias = "touchkit", 738 .alias = "touchkit",
726 .detect = touchkit_ps2_detect, 739 .detect = touchkit_ps2_detect,
727 }, 740 },
741#endif
728 { 742 {
729 .type = PSMOUSE_AUTO, 743 .type = PSMOUSE_AUTO,
730 .name = "auto", 744 .name = "auto",
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index f0f9413d762c..e42a0a4345ac 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -40,33 +40,70 @@
40#define YMIN_NOMINAL 1408 40#define YMIN_NOMINAL 1408
41#define YMAX_NOMINAL 4448 41#define YMAX_NOMINAL 4448
42 42
43
43/***************************************************************************** 44/*****************************************************************************
44 * Synaptics communications functions 45 * Stuff we need even when we do not want native Synaptics support
45 ****************************************************************************/ 46 ****************************************************************************/
46 47
47/* 48/*
48 * Send a command to the synpatics touchpad by special commands 49 * Set the synaptics touchpad mode byte by special commands
49 */ 50 */
50static int synaptics_send_cmd(struct psmouse *psmouse, unsigned char c, unsigned char *param) 51static int synaptics_mode_cmd(struct psmouse *psmouse, unsigned char mode)
51{ 52{
52 if (psmouse_sliced_command(psmouse, c)) 53 unsigned char param[1];
54
55 if (psmouse_sliced_command(psmouse, mode))
53 return -1; 56 return -1;
54 if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO)) 57 param[0] = SYN_PS_SET_MODE2;
58 if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETRATE))
55 return -1; 59 return -1;
56 return 0; 60 return 0;
57} 61}
58 62
63int synaptics_detect(struct psmouse *psmouse, int set_properties)
64{
65 struct ps2dev *ps2dev = &psmouse->ps2dev;
66 unsigned char param[4];
67
68 param[0] = 0;
69
70 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
71 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
72 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
73 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
74 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
75
76 if (param[1] != 0x47)
77 return -ENODEV;
78
79 if (set_properties) {
80 psmouse->vendor = "Synaptics";
81 psmouse->name = "TouchPad";
82 }
83
84 return 0;
85}
86
87void synaptics_reset(struct psmouse *psmouse)
88{
89 /* reset touchpad back to relative mode, gestures enabled */
90 synaptics_mode_cmd(psmouse, 0);
91}
92
93#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
94
95/*****************************************************************************
96 * Synaptics communications functions
97 ****************************************************************************/
98
59/* 99/*
60 * Set the synaptics touchpad mode byte by special commands 100 * Send a command to the synpatics touchpad by special commands
61 */ 101 */
62static int synaptics_mode_cmd(struct psmouse *psmouse, unsigned char mode) 102static int synaptics_send_cmd(struct psmouse *psmouse, unsigned char c, unsigned char *param)
63{ 103{
64 unsigned char param[1]; 104 if (psmouse_sliced_command(psmouse, c))
65
66 if (psmouse_sliced_command(psmouse, mode))
67 return -1; 105 return -1;
68 param[0] = SYN_PS_SET_MODE2; 106 if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO))
69 if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETRATE))
70 return -1; 107 return -1;
71 return 0; 108 return 0;
72} 109}
@@ -529,12 +566,6 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
529 clear_bit(REL_Y, dev->relbit); 566 clear_bit(REL_Y, dev->relbit);
530} 567}
531 568
532void synaptics_reset(struct psmouse *psmouse)
533{
534 /* reset touchpad back to relative mode, gestures enabled */
535 synaptics_mode_cmd(psmouse, 0);
536}
537
538static void synaptics_disconnect(struct psmouse *psmouse) 569static void synaptics_disconnect(struct psmouse *psmouse)
539{ 570{
540 synaptics_reset(psmouse); 571 synaptics_reset(psmouse);
@@ -569,30 +600,6 @@ static int synaptics_reconnect(struct psmouse *psmouse)
569 return 0; 600 return 0;
570} 601}
571 602
572int synaptics_detect(struct psmouse *psmouse, int set_properties)
573{
574 struct ps2dev *ps2dev = &psmouse->ps2dev;
575 unsigned char param[4];
576
577 param[0] = 0;
578
579 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
580 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
581 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
582 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
583 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO);
584
585 if (param[1] != 0x47)
586 return -1;
587
588 if (set_properties) {
589 psmouse->vendor = "Synaptics";
590 psmouse->name = "TouchPad";
591 }
592
593 return 0;
594}
595
596#if defined(__i386__) 603#if defined(__i386__)
597#include <linux/dmi.h> 604#include <linux/dmi.h>
598static struct dmi_system_id toshiba_dmi_table[] = { 605static struct dmi_system_id toshiba_dmi_table[] = {
@@ -680,4 +687,12 @@ int synaptics_init(struct psmouse *psmouse)
680 return -1; 687 return -1;
681} 688}
682 689
690#else /* CONFIG_MOUSE_PS2_SYNAPTICS */
691
692int synaptics_init(struct psmouse *psmouse)
693{
694 return -ENOSYS;
695}
696
697#endif /* CONFIG_MOUSE_PS2_SYNAPTICS */
683 698
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 68fff1dcd7de..02aa4cf7bc77 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -9,10 +9,6 @@
9#ifndef _SYNAPTICS_H 9#ifndef _SYNAPTICS_H
10#define _SYNAPTICS_H 10#define _SYNAPTICS_H
11 11
12extern int synaptics_detect(struct psmouse *psmouse, int set_properties);
13extern int synaptics_init(struct psmouse *psmouse);
14extern void synaptics_reset(struct psmouse *psmouse);
15
16/* synaptics queries */ 12/* synaptics queries */
17#define SYN_QUE_IDENTIFY 0x00 13#define SYN_QUE_IDENTIFY 0x00
18#define SYN_QUE_MODES 0x01 14#define SYN_QUE_MODES 0x01
@@ -62,9 +58,9 @@ extern void synaptics_reset(struct psmouse *psmouse);
62#define SYN_MODE_WMODE(m) ((m) & (1 << 0)) 58#define SYN_MODE_WMODE(m) ((m) & (1 << 0))
63 59
64/* synaptics identify query bits */ 60/* synaptics identify query bits */
65#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) 61#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f)
66#define SYN_ID_MAJOR(i) ((i) & 0x0f) 62#define SYN_ID_MAJOR(i) ((i) & 0x0f)
67#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) 63#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff)
68#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) 64#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47)
69 65
70/* synaptics special commands */ 66/* synaptics special commands */
@@ -98,8 +94,8 @@ struct synaptics_hw_state {
98struct synaptics_data { 94struct synaptics_data {
99 /* Data read from the touchpad */ 95 /* Data read from the touchpad */
100 unsigned long int model_id; /* Model-ID */ 96 unsigned long int model_id; /* Model-ID */
101 unsigned long int capabilities; /* Capabilities */ 97 unsigned long int capabilities; /* Capabilities */
102 unsigned long int ext_cap; /* Extended Capabilities */ 98 unsigned long int ext_cap; /* Extended Capabilities */
103 unsigned long int identity; /* Identification */ 99 unsigned long int identity; /* Identification */
104 100
105 unsigned char pkt_type; /* packet type - old, new, etc */ 101 unsigned char pkt_type; /* packet type - old, new, etc */
@@ -107,4 +103,8 @@ struct synaptics_data {
107 int scroll; 103 int scroll;
108}; 104};
109 105
106int synaptics_detect(struct psmouse *psmouse, int set_properties);
107int synaptics_init(struct psmouse *psmouse);
108void synaptics_reset(struct psmouse *psmouse);
109
110#endif /* _SYNAPTICS_H */ 110#endif /* _SYNAPTICS_H */
diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h
index 3f03fbcaf8f0..61e9dfd8419f 100644
--- a/drivers/input/mouse/touchkit_ps2.h
+++ b/drivers/input/mouse/touchkit_ps2.h
@@ -12,6 +12,13 @@
12#ifndef _TOUCHKIT_PS2_H 12#ifndef _TOUCHKIT_PS2_H
13#define _TOUCHKIT_PS2_H 13#define _TOUCHKIT_PS2_H
14 14
15#ifdef CONFIG_MOUSE_PS2_TOUCHKIT
15int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties); 16int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties);
17#else
18inline int touchkit_ps2_detect(struct psmouse *psmouse, int set_properties)
19{
20 return -ENOSYS;
21}
22#endif /* CONFIG_MOUSE_PS2_TOUCHKIT */
16 23
17#endif 24#endif
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
index 050298b1a09d..c10a6e7d0101 100644
--- a/drivers/input/mouse/trackpoint.h
+++ b/drivers/input/mouse/trackpoint.h
@@ -142,6 +142,13 @@ struct trackpoint_data
142 unsigned char ext_dev; 142 unsigned char ext_dev;
143}; 143};
144 144
145extern int trackpoint_detect(struct psmouse *psmouse, int set_properties); 145#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
146int trackpoint_detect(struct psmouse *psmouse, int set_properties);
147#else
148inline int trackpoint_detect(struct psmouse *psmouse, int set_properties)
149{
150 return -ENOSYS;
151}
152#endif /* CONFIG_MOUSE_PS2_TRACKPOINT */
146 153
147#endif /* _TRACKPOINT_H */ 154#endif /* _TRACKPOINT_H */