mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Hans de Goede <hdegoede@redhat.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Timo Aaltonen <timo.aaltonen@canonical.com>,
	Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.13.y-ckt 04/90] Input: synaptics - report INPUT_PROP_TOPBUTTONPAD property
Date: Tue,  5 May 2015 13:53:36 -0700	[thread overview]
Message-ID: <1430859302-5886-5-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1430859302-5886-1-git-send-email-kamal@canonical.com>

3.13.11-ckt20 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hans de Goede <hdegoede@redhat.com>

commit 43e19888b1fe2a3e8a5543030c5b286cde38b3f5 upstream.

Check PNP ID of the PS/2 AUX port and report INPUT_PROP_TOPBUTTONPAD
property for for touchpads with top button areas.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/input/mouse/synaptics.c | 55 +++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index a9642f5..b9b12f74 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -117,6 +117,44 @@ void synaptics_reset(struct psmouse *psmouse)
 }
 
 #ifdef CONFIG_MOUSE_PS2_SYNAPTICS
+/* This list has been kindly provided by Synaptics. */
+static const char * const topbuttonpad_pnp_ids[] = {
+	"LEN0017",
+	"LEN0018",
+	"LEN0019",
+	"LEN0023",
+	"LEN002A",
+	"LEN002B",
+	"LEN002C",
+	"LEN002D",
+	"LEN002E",
+	"LEN0033", /* Helix */
+	"LEN0034", /* T431s, T540, X1 Carbon 2nd */
+	"LEN0035", /* X240 */
+	"LEN0036", /* T440 */
+	"LEN0037",
+	"LEN0038",
+	"LEN0041",
+	"LEN0042", /* Yoga */
+	"LEN0045",
+	"LEN0046",
+	"LEN0047",
+	"LEN0048",
+	"LEN0049",
+	"LEN2000",
+	"LEN2001",
+	"LEN2002",
+	"LEN2003",
+	"LEN2004", /* L440 */
+	"LEN2005",
+	"LEN2006",
+	"LEN2007",
+	"LEN2008",
+	"LEN2009",
+	"LEN200A",
+	"LEN200B",
+	NULL
+};
 
 /*****************************************************************************
  *	Synaptics communications functions
@@ -1318,8 +1356,10 @@ static void set_abs_position_params(struct input_dev *dev,
 	input_abs_set_res(dev, y_code, priv->y_res);
 }
 
-static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
+static void set_input_params(struct psmouse *psmouse,
+			     struct synaptics_data *priv)
 {
+	struct input_dev *dev = psmouse->dev;
 	int i;
 
 	/* Things that apply to both modes */
@@ -1388,6 +1428,17 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
 
 	if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) {
 		__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
+		/* See if this buttonpad has a top button area */
+		if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) {
+			for (i = 0; topbuttonpad_pnp_ids[i]; i++) {
+				if (strstr(psmouse->ps2dev.serio->firmware_id,
+					   topbuttonpad_pnp_ids[i])) {
+					__set_bit(INPUT_PROP_TOPBUTTONPAD,
+						  dev->propbit);
+					break;
+				}
+			}
+		}
 		/* Clickpads report only left button */
 		__clear_bit(BTN_RIGHT, dev->keybit);
 		__clear_bit(BTN_MIDDLE, dev->keybit);
@@ -1732,7 +1783,7 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)
 		     priv->capabilities, priv->ext_cap, priv->ext_cap_0c,
 		     priv->board_id, priv->firmware_id);
 
-	set_input_params(psmouse->dev, priv);
+	set_input_params(psmouse, priv);
 
 	/*
 	 * Encode touchpad model so that it can be used to set
-- 
1.9.1


  parent reply	other threads:[~2015-05-05 20:55 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 20:53 [3.13.y-ckt stable] Linux 3.13.11-ckt20 stable review Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 01/90] Input: serio - add firmware_id sysfs attribute Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 02/90] Input: i8042 - add firmware_id support Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 03/90] Input: Add INPUT_PROP_TOPBUTTONPAD device property Kamal Mostafa
2015-05-05 20:53 ` Kamal Mostafa [this message]
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 05/90] Input: synaptics - add a matches_pnp_id helper function Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 06/90] Input: synaptics - change min/max quirk table to pnp-id matching Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 07/90] Input: psmouse - add psmouse_matches_pnp_id helper function Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 08/90] Input: synaptics - split synaptics_resolution(), query first Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 09/90] Input: synaptics - log queried and quirked dimension values Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 10/90] Input: synaptics - remove obsolete min/max quirk for X240 Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 11/90] Input: synaptics - add min/max quirk for pnp-id LEN2002 (Edge E531) Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 12/90] Input: synaptics - add min/max quirk for Lenovo T440s Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 13/90] Input: synaptics - adjust min/max for Lenovo ThinkPad X1 Carbon 2nd Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 14/90] Input: synaptics - adjust min/max on Thinkpad E540 Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 15/90] Input: synaptics - support min/max board id in min_max_pnpid_table Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 16/90] Input: synaptics - skip quirks when post-2013 dimensions Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 17/90] n_tty: Merge .receive_buf() flavors Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 18/90] n_tty: Fix read buffer overwrite when no newline Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 19/90] KVM: x86: Fix lost interrupt on irr_pending race Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 20/90] fs: take i_mutex during prepare_binprm for set[ug]id executables Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 21/90] tcp: Fix crash in TCP Fast Open Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 22/90] writeback: add missing INITIAL_JIFFIES init in global_update_bandwidth() Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 23/90] nbd: fix possible memory leak Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 24/90] mfd: kempld-core: Fix callback return value check Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 25/90] KVM: nVMX: mask unrestricted_guest if disabled on L0 Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 26/90] spi: trigger trace event for message-done before mesg->complete Kamal Mostafa
2015-05-05 20:53 ` [PATCH 3.13.y-ckt 27/90] powerpc/pseries: Little endian fixes for post mobility device tree update Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 28/90] net: ethernet: pcnet32: Setup the SRAM and NOUFLO on Am79C97{3, 5} Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 29/90] perf: Fix irq_work 'tail' recursion Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 30/90] arm64: Use the reserved TTBR0 if context switching to the init_mm Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 31/90] selinux: fix sel_write_enforce broken return value Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 32/90] mm: fix anon_vma->degree underflow in anon_vma endless growing prevention Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 33/90] mm/memory hotplug: postpone the reset of obsolete pgdat Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 34/90] hfsplus: fix B-tree corruption after insertion at position 0 Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 35/90] ARC: SA_SIGINFO ucontext regs off-by-one Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 36/90] writeback: fix possible underflow in write bandwidth calculation Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 37/90] iio: fix drivers that check buffer->scan_mask Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 38/90] iio: inv_mpu6050: Clear timestamps fifo while resetting hardware fifo Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 39/90] iio: core: Fix double free Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 40/90] USB: ftdi_sio: Added custom PID for Synapse Wireless product Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 41/90] iwlwifi: dvm: run INIT firmware again upon .start() Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 42/90] USB: keyspan_pda: add new device id Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 43/90] cifs: smb2_clone_range() - exit on unhandled error Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 44/90] cifs: fix use-after-free bug in find_writable_file Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 45/90] can: flexcan: Deferred on Regulator return EPROBE_DEFER Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 46/90] usb: xhci: handle Config Error Change (CEC) in xhci driver Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 47/90] usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 48/90] USB: ftdi_sio: Use jtag quirk for SNAP Connect E10 Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 49/90] tty: serial: fsl_lpuart: clear receive flag on FIFO flush Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 50/90] radeon: Do not directly dereference pointers to BIOS area Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 51/90] iio: imu: Use iio_trigger_get for indio_dev->trig assignment Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 52/90] dmaengine: edma: fix memory leak when terminating running transfers Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 53/90] dmaengine: omap-dma: Fix memory leak when terminating running transfer Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 54/90] x86/reboot: Add ASRock Q1900DC-ITX mainboard reboot quirk Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 55/90] mac80211: fix RX A-MPDU session reorder timer deletion Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 56/90] IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 57/90] tcp: prevent fetching dst twice in early demux code Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 58/90] net: use for_each_netdev_safe() in rtnl_group_changelink() Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 59/90] xen-netfront: transmit fully GSO-sized packets Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 60/90] tcp: fix FRTO undo on cumulative ACK of SACKed range Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 61/90] PCI: cpcihp: Add missing curly braces in cpci_configure_slot() Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 62/90] [media] sh_veu: v4l2_dev wasn't set Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 63/90] [media] media: s5p-mfc: fix mmap support for 64bit arch Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 64/90] cpuidle: ACPI: do not overwrite name and description of C0 Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 65/90] ioctx_alloc(): fix vma (and file) leak on failure Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 66/90] ALSA: hda/realtek - Make more stable to get pin sense for ALC283 Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 67/90] be2iscsi: Fix kernel panic when device initialization fails Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 68/90] Defer processing of REQ_PREEMPT requests for blocked devices Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 69/90] ALSA: hda - Fix headphone pin config for Lifebook T731 Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 70/90] ocfs2: _really_ sync the right range Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 71/90] ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 72/90] iscsi target: fix oops when adding reject pdu Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 73/90] net/mlx4_en: Call register_netdevice in the proper location Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 74/90] ipv6: protect skb->sk accesses from recursive dereference inside the stack Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 75/90] tcp: tcp_make_synack() should clear skb->tstamp Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 76/90] 8139cp: Call dev_kfree_skby_any instead of kfree_skb Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 77/90] 8139too: Call dev_kfree_skby_any instead of dev_kfree_skb Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 78/90] r8169: " Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 79/90] bonding: Call dev_kfree_skby_any instead of kfree_skb Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 80/90] bnx2: Call dev_kfree_skby_any instead of dev_kfree_skb Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 81/90] tg3: " Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 82/90] ixgb: " Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 83/90] benet: Call dev_kfree_skby_any instead of kfree_skb Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 84/90] gianfar: Carefully free skbs in functions called by netpoll Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 85/90] ip_forward: Drop frames with attached skb->sk Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 86/90] tcp: fix possible deadlock in tcp_send_fin() Kamal Mostafa
2015-05-05 20:54 ` [PATCH 3.13.y-ckt 87/90] tcp: avoid looping " Kamal Mostafa
2015-05-05 20:55 ` [PATCH 3.13.y-ckt 88/90] net: do not deplete pfmemalloc reserve Kamal Mostafa
2015-05-05 20:55 ` [PATCH 3.13.y-ckt 89/90] net: fix crash in build_skb() Kamal Mostafa
2015-05-05 20:55 ` [PATCH 3.13.y-ckt 90/90] ipv4: Missing sk_nulls_node_init() in ping_unhash() Kamal Mostafa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430859302-5886-5-git-send-email-kamal@canonical.com \
    --to=kamal@canonical.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=timo.aaltonen@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®