Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179304
b: refs/heads/master
c: e4e6efd
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Drake authored and Dmitry Torokhov committed Jan 7, 2010
1 parent c489d16 commit 152c0f3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f2701b79f2ee0c5eb946e8a87993acbe8041da3
refs/heads/master: e4e6efd2df4b5754bd519b516207eb723d1f17df
9 changes: 8 additions & 1 deletion trunk/drivers/input/mouse/psmouse-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,15 @@ static int psmouse_extensions(struct psmouse *psmouse,
synaptics_hardware = true;

if (max_proto > PSMOUSE_IMEX) {
if (!set_properties || synaptics_init(psmouse) == 0)
/*
* Try activating protocol, but check if support is enabled first, since
* we try detecting Synaptics even when protocol is disabled.
*/
if (synaptics_supported() &&
(!set_properties || synaptics_init(psmouse) == 0)) {
return PSMOUSE_SYNAPTICS;
}

/*
* Some Synaptics touchpads can emulate extended protocols (like IMPS/2).
* Unfortunately Logitech/Genius probes confuse some firmware versions so
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,11 @@ int synaptics_init(struct psmouse *psmouse)
return -1;
}

bool synaptics_supported(void)
{
return true;
}

#else /* CONFIG_MOUSE_PS2_SYNAPTICS */

void __init synaptics_module_init(void)
Expand All @@ -754,5 +759,10 @@ int synaptics_init(struct psmouse *psmouse)
return -ENOSYS;
}

bool synaptics_supported(void)
{
return false;
}

#endif /* CONFIG_MOUSE_PS2_SYNAPTICS */

1 change: 1 addition & 0 deletions trunk/drivers/input/mouse/synaptics.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@ void synaptics_module_init(void);
int synaptics_detect(struct psmouse *psmouse, bool set_properties);
int synaptics_init(struct psmouse *psmouse);
void synaptics_reset(struct psmouse *psmouse);
bool synaptics_supported(void);

#endif /* _SYNAPTICS_H */

0 comments on commit 152c0f3

Please sign in to comment.