touchpad: drop 'is blacklisted' check for dwt pairing

dwt is needed on internal touchpads only and those external ones that are a
combo device. This also now gives us the same check for palm detect and dwt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2017-02-10 10:39:25 +10:00
parent 019f185107
commit 7c3279346d

View file

@ -1486,23 +1486,6 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data)
time + timeout);
}
static bool
tp_dwt_device_is_blacklisted(struct evdev_device *device)
{
unsigned int bus = libevdev_get_id_bustype(device->evdev);
unsigned int vendor_id = libevdev_get_id_vendor(device->evdev);
/* evemu will set the right bus type */
if (bus == BUS_VIRTUAL || bus == BUS_BLUETOOTH)
return true;
/* Wacom doesn't have devices that need dwt */
if (vendor_id == VENDOR_ID_WACOM)
return true;
return false;
}
static bool
tp_want_dwt(struct evdev_device *touchpad,
struct evdev_device *keyboard)
@ -1514,10 +1497,6 @@ tp_want_dwt(struct evdev_device *touchpad,
unsigned int product_tp = evdev_device_get_id_product(touchpad);
unsigned int product_kbd = evdev_device_get_id_product(keyboard);
if (tp_dwt_device_is_blacklisted(touchpad) ||
tp_dwt_device_is_blacklisted(keyboard))
return false;
/* External touchpads with the same vid/pid as the keyboard are
considered a happy couple */
if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD)
@ -2194,7 +2173,8 @@ static void
tp_init_dwt(struct tp_dispatch *tp,
struct evdev_device *device)
{
if (tp_dwt_device_is_blacklisted(device))
if (device->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD &&
!tp_is_tpkb_combo_below(device))
return;
tp->dwt.config.is_available = tp_dwt_config_is_available;