Revert "Support the new Lenovo X1 Carbon 3rd trackpoint buttons"

This reverts commit 064445364b.

The Lenovo *50 series, including the X1 Carbon 3rd always require multiple
kernel patches to enable the touchpad buttons. This patch in synaptics only
addresses the re-routing of the top buttons.

The final iteration of the kernel patches also route the trackpoint buttons
through the trackpoint device, rendering this patch unnecessary. These patches
are queued for 4.0.

See kernel patch series up to commit cdd9dc195916ef5644cfac079094c3c1d1616e4c
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Sun Mar 8 22:35:41 2015 -0700

    Input: synaptics - re-route tracksticks buttons on the Lenovo 2015 series

Currently in Dmitry's for-linus branch.

Distributions running older kernels or the kernel stable series which has
partial backports of the above patch series are encouraged to leave the
0644453 commit in and undo this revert.

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
2015-03-17 16:06:41 +10:00
parent 00db769067
commit 5378a020a0
7 changed files with 0 additions and 102 deletions

View File

@@ -44,10 +44,3 @@ Section "InputClass"
MatchDriver "synaptics"
Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
Section "InputClass"
Identifier "Lenovo *50 and Carbon 3rd trackpoint buttons"
MatchDriver "synaptics"
MatchTag "has_trackpoint_buttons"
Option "HasTrackpointButtons" "on"
EndSection

View File

@@ -1,20 +0,0 @@
ACTION=="remove", GOTO="touchpad_end"
KERNEL!="event*", GOTO="touchpad_end"
ENV{ID_INPUT_TOUCHPAD}=="", GOTO="touchpad_end"
# Lenovo X1 Carbon 3rd
KERNELS=="serio1", \
ATTRS{firmware_id}=="*LEN0048*", \
ENV{ID_INPUT.tags}="has_trackpoint_buttons"
# Lenovo W451
KERNELS=="serio1", \
ATTRS{firmware_id}=="*LEN004a*", \
ENV{ID_INPUT.tags}="has_trackpoint_buttons"
# Lenovo T450s
KERNELS=="serio1", \
ATTRS{firmware_id}=="*LEN200f*", \
ENV{ID_INPUT.tags}="has_trackpoint_buttons"
LABEL="touchpad_end"

View File

@@ -25,10 +25,3 @@ else
fdidir = $(datadir)/hal/fdi/policy/20thirdparty
dist_fdi_DATA = 11-x11-synaptics.fdi
endif
if HAVE_UDEV_RULES_DIR
udevdir=$(UDEV_RULES_DIR)
udev_DATA = 71-synaptics.rules
endif
EXTRA_DIST = 71-synaptics.rules

View File

@@ -135,16 +135,6 @@ AM_CONDITIONAL([BUILD_EVENTCOMM], [test "x${BUILD_EVENTCOMM}" = "xyes"])
AM_CONDITIONAL([BUILD_PSMCOMM], [test "x${BUILD_PSMCOMM}" = "xyes"])
AM_CONDITIONAL([BUILD_PS2COMM], [test "x${BUILD_PS2COMM}" = "xyes"])
AC_ARG_WITH(udev-rules-dir,
AS_HELP_STRING([--with-udev-rules-dir=DIR],
[Directory where udev expects its rules files
[[default=$libdir/udev/rules.d]]]),
[udevdir="$withval"],
[udevdir="$libdir/udev/rules.d"])
UDEV_RULES_DIR=${udevdir}
AC_SUBST(UDEV_RULES_DIR)
AM_CONDITIONAL(HAVE_UDEV_RULES_DIR, [test "x$UDEV_RULES_DIR" != "xno"])
# -----------------------------------------------------------------------------
# Dependencies for synclient and syndaemon
# -----------------------------------------------------------------------------

View File

@@ -518,20 +518,6 @@ initialized if
.B Option \*qHasSecondarySoftButtons\*q
is enabled and this option is set in the __xconfigfile__(__filemansuffix__).
.
.TP
.BI "Option \*qHasTrackpointButtons\*q \*q" boolean \*q
This option is only available on selected devices. You should never need to
set this option manually, your distribution should ship
__xconfigfile__(__filemansuffix__) snippets to enable this option where
required. Devices that require this option include the Lenovo X1 Carbon 3rd
and the Lenovo *50 series (T450, T550, etc.).
If enabled, the device is considered to have the trackpoint left, middle,
right buttons wired to the touchpad. If set, this option disables scroll
buttons, i.e.
.B Option \*qUpDownScrolling\*q, \*qLeftRightScrolling\*q
and the respective repeat options for scroll buttons.
This options is considered a hardware property and is not exposed as
configurable X Input device property.
.SH CONFIGURATION DETAILS
.SS Area handling

View File

@@ -702,12 +702,6 @@ set_default_parameters(InputInfoPtr pInfo)
xf86SetBoolOption(opts, "HorizTwoFingerScroll", horizTwoFingerScroll);
pars->touchpad_off = xf86SetIntOption(opts, "TouchpadOff", TOUCHPAD_ON);
if (priv->has_scrollbuttons) {
priv->has_trackpoint_buttons = xf86SetBoolOption(opts, "HasTrackpointButtons", FALSE);
if (priv->has_trackpoint_buttons)
priv->has_scrollbuttons = FALSE;
}
if (priv->has_scrollbuttons) {
pars->updown_button_scrolling =
xf86SetBoolOption(opts, "UpDownScrolling", TRUE);
@@ -1087,7 +1081,6 @@ SynapticsReset(SynapticsPrivate * priv)
priv->mid_emu_state = MBE_OFF;
priv->nextRepeat = 0;
priv->lastButtons = 0;
priv->lastTrackpointButtons = 0;
priv->prev_z = 0;
priv->prevFingers = 0;
priv->num_active_touches = 0;
@@ -2786,34 +2779,6 @@ handle_clickfinger(SynapticsPrivate * priv, struct SynapticsHwState *hw)
}
}
static void
handle_trackpoint_buttons(const InputInfoPtr pInfo,
struct SynapticsHwState *hw)
{
SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private);
unsigned int buttons, change;
int id;
buttons = (hw->multi[0] ? 0x1 : 0) |
(hw->multi[1] ? 0x4 : 0) |
(hw->multi[2] ? 0x2 : 0);
change = buttons ^ priv->lastTrackpointButtons;
while (change) {
id = ffs(change); /* number of first set bit 1..32 is returned */
change &= ~(1 << (id - 1));
xf86PostButtonEvent(pInfo->dev, FALSE, id,
(buttons & (1 << (id - 1))),
0, 0);
}
hw->multi[0] = FALSE;
hw->multi[1] = FALSE;
hw->multi[2] = FALSE;
priv->lastTrackpointButtons = buttons;
}
/* Adjust the hardware state according to the extra buttons (if the touchpad
* has any and not many touchpads do these days). These buttons are up/down
* tilt buttons and/or left/right buttons that then map into a specific
@@ -3169,13 +3134,6 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
Bool using_cumulative_coords = FALSE;
Bool ignore_motion;
/* if we have phys. trackpoint buttons wired up to the touchpad, process
* them first. They belong to a different device so we don't care about
* sending out motion events before the trackpoint buttons. This makes
* the code a lot easier to slot in */
if (priv->has_trackpoint_buttons)
handle_trackpoint_buttons(pInfo, hw);
/* We need both and x/y, the driver can't handle just one of the two
* yet. But since it's possible to hit a phys button on non-clickpads
* without ever getting motion data first, we must continue with 0/0 for

View File

@@ -289,7 +289,6 @@ struct _SynapticsPrivateRec {
int repeatButtons; /* buttons for repeat */
int nextRepeat; /* Time when to trigger next auto repeat event */
int lastButtons; /* last state of the buttons */
int lastTrackpointButtons; /* last state of the trackpoint buttons */
int prev_z; /* previous z value, for palm detection */
int prevFingers; /* previous numFingers, for transition detection */
int avg_width; /* weighted average of previous fingerWidth values */
@@ -309,7 +308,6 @@ struct _SynapticsPrivateRec {
Bool has_pressure; /* device reports pressure */
Bool has_width; /* device reports finger width */
Bool has_scrollbuttons; /* device has physical scrollbuttons */
Bool has_trackpoint_buttons;/* device has trackpoint buttons wired to touchpad */
Bool has_semi_mt; /* device is only semi-multitouch capable */
Bool has_mt_palm_detect; /* device reports per finger width and pressure */