* [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property @ 2014-04-15 7:24 Hans de Goede 2014-04-15 7:24 ` [PATCH v3 1/2] " Hans de Goede ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Hans de Goede @ 2014-04-15 7:24 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: Benjamin Tissoires, Peter Hutterer, linux-input Hi All, I've received an updated list of pnpids from synaptics so here is an updated version of the patch-set. Changes in v2: -Drop adding of pnp_id to struct serio (drop patches 2/4 and 3/4 of v1) -Modify the synaptics patch to use firmware_id instead of pnp_id Changes in v3: -Update topbuttonpad pnpid list in synaptics.c Regards, Hans ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property 2014-04-15 7:24 [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Hans de Goede @ 2014-04-15 7:24 ` Hans de Goede 2014-04-15 7:24 ` [PATCH v3 2/2] synaptics: Report INPUT_PROP_TOPBUTTONPAD property for touchpads with top buttonareas Hans de Goede 2014-04-20 5:30 ` [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Dmitry Torokhov 2 siblings, 0 replies; 4+ messages in thread From: Hans de Goede @ 2014-04-15 7:24 UTC (permalink / raw) To: Dmitry Torokhov Cc: Benjamin Tissoires, Peter Hutterer, linux-input, Hans de Goede On some newer laptops with a trackpoint the physical buttons for the trackpoint have been removed to allow for a larger touchpad. On these laptops the buttonpad has clearly marked areas on the top which are to be used as trackpad buttons. Users of the event device-node need to know about this, so that they can properly interpret BTN_LEFT events as being a left / right / middle click depending on where on the button pad the clicking finger is. This commits adds a INPUT_PROP_TOPBUTTONPAD device property which drivers for such buttonpads will use to signal to the user that this buttonpad not only has the normal bottom button area, but also a top button area. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- include/uapi/linux/input.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index bd24470..f484952 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -164,6 +164,7 @@ struct input_keymap_entry { #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ +#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_MAX 0x1f #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) -- 1.9.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] synaptics: Report INPUT_PROP_TOPBUTTONPAD property for touchpads with top buttonareas 2014-04-15 7:24 [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Hans de Goede 2014-04-15 7:24 ` [PATCH v3 1/2] " Hans de Goede @ 2014-04-15 7:24 ` Hans de Goede 2014-04-20 5:30 ` [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Dmitry Torokhov 2 siblings, 0 replies; 4+ messages in thread From: Hans de Goede @ 2014-04-15 7:24 UTC (permalink / raw) To: Dmitry Torokhov Cc: Benjamin Tissoires, Peter Hutterer, linux-input, Hans de Goede Signed-off-by: Hans de Goede <hdegoede@redhat.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 02132cd..66bd239 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 @@ -1255,8 +1293,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 */ @@ -1325,6 +1365,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); @@ -1627,7 +1678,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.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property 2014-04-15 7:24 [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Hans de Goede 2014-04-15 7:24 ` [PATCH v3 1/2] " Hans de Goede 2014-04-15 7:24 ` [PATCH v3 2/2] synaptics: Report INPUT_PROP_TOPBUTTONPAD property for touchpads with top buttonareas Hans de Goede @ 2014-04-20 5:30 ` Dmitry Torokhov 2 siblings, 0 replies; 4+ messages in thread From: Dmitry Torokhov @ 2014-04-20 5:30 UTC (permalink / raw) To: Hans de Goede; +Cc: Benjamin Tissoires, Peter Hutterer, linux-input On Tue, Apr 15, 2014 at 09:24:21AM +0200, Hans de Goede wrote: > Hi All, > > I've received an updated list of pnpids from synaptics so here is an updated > version of the patch-set. > > Changes in v2: > -Drop adding of pnp_id to struct serio (drop patches 2/4 and 3/4 of v1) > -Modify the synaptics patch to use firmware_id instead of pnp_id > > Changes in v3: > -Update topbuttonpad pnpid list in synaptics.c Applied, thank you. -- Dmitry ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-20 5:30 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-15 7:24 [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Hans de Goede 2014-04-15 7:24 ` [PATCH v3 1/2] " Hans de Goede 2014-04-15 7:24 ` [PATCH v3 2/2] synaptics: Report INPUT_PROP_TOPBUTTONPAD property for touchpads with top buttonareas Hans de Goede 2014-04-20 5:30 ` [PATCH v3 0/2] uapi/input.h: Add INPUT_PROP_TOPBUTTONPAD device property Dmitry Torokhov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).