diff options
| author | Henrik Rydberg <rydberg@bitmath.org> | 2010-10-16 11:32:41 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@bitmath.org> | 2010-10-16 11:32:41 +0200 |
| commit | 5a3cacc6ced0e0ab8831e13b470af1ab0bea3941 (patch) | |
| tree | 3ba72168f271c2b2de2203651a494a93de893e4a /src/capabilities.c | |
| parent | fd9eb4deb75ea5c002bcd3521555082db40d009c (diff) | |
Enable integrated button support for the Magic Trackpad
The magic trackpad has an integrated button. This patch detects
the integrated button which enables the special logic for those devices.
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'src/capabilities.c')
| -rw-r--r-- | src/capabilities.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c index 0d11669..3459408 100644 --- a/src/capabilities.c +++ b/src/capabilities.c | |||
| @@ -57,6 +57,10 @@ static int has_mt_data(const struct Capabilities *cap) | |||
| 57 | static int has_integrated_button(const struct Capabilities *cap) | 57 | static int has_integrated_button(const struct Capabilities *cap) |
| 58 | { | 58 | { |
| 59 | static const int bcm5974_vmask_ibt = 1; | 59 | static const int bcm5974_vmask_ibt = 1; |
| 60 | /* magic trackpad */ | ||
| 61 | if (cap->devid.vendor == 0x05ac && cap->devid.product == 0x030e) | ||
| 62 | return 1; | ||
| 63 | /* macbooks */ | ||
| 60 | if (strcmp(cap->devname, "bcm5974")) | 64 | if (strcmp(cap->devname, "bcm5974")) |
| 61 | return 0; | 65 | return 0; |
| 62 | return cap->devid.version & bcm5974_vmask_ibt; | 66 | return cap->devid.version & bcm5974_vmask_ibt; |
