Skip to contentSkip to conversation

Input: hgpk - remove protocol support

PATCH In review Dmitry Torokhov 2 participants 2 messages Mar 11

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: hgpk - remove protocol support

The protocol flavor for ALPS touchpads found in OLPC laptops has been broken since 2015 commit c378b5119eb0 ("Input: psmouse - factor out common protocol probing code") that forgot to add hgpk_init() to HGPK entry in psmouse_protocols array.

Since nobody complained for 10 years let's remove it.

---
 drivers/input/mouse/Kconfig        |   10 -
 drivers/input/mouse/Makefile       |    1 -
 drivers/input/mouse/hgpk.c         | 1063 ----------------------------
 drivers/input/mouse/hgpk.h         |   61 --
 drivers/input/mouse/psmouse-base.c |   21 +-
 drivers/input/mouse/psmouse.h      |    2 +-
 6 files changed, 2 insertions(+), 1156 deletions(-)
drivers/input/mouse/Kconfig +0 -10
index 833b643f0616..30d119d4634b 100644
@@ -164,16 +164,6 @@ config MOUSE_PS2_TOUCHKIT
 
 	  If unsure, say N.
 
-config MOUSE_PS2_OLPC
-	bool "OLPC PS/2 mouse protocol extension"
-	depends on MOUSE_PS2 && OLPC
-	help
-	  Say Y here if you have an OLPC XO-1 laptop (with built-in
-	  PS/2 touchpad/tablet device).  The manufacturer calls the
-	  touchpad an HGPK.
-
-	  If unsure, say N.
-
 config MOUSE_PS2_FOCALTECH
 	bool "FocalTech PS/2 mouse protocol extension" if EXPERT
 	default y
drivers/input/mouse/Makefile +0 -1
index a1336d5bee6f..137ed0c32d90 100644
@@ -29,7 +29,6 @@ psmouse-objs := psmouse-base.o synaptics.o focaltech.o
 psmouse-$(CONFIG_MOUSE_PS2_ALPS)	+= alps.o
 psmouse-$(CONFIG_MOUSE_PS2_BYD)		+= byd.o
 psmouse-$(CONFIG_MOUSE_PS2_ELANTECH)	+= elantech.o
-psmouse-$(CONFIG_MOUSE_PS2_OLPC)	+= hgpk.o
 psmouse-$(CONFIG_MOUSE_PS2_LOGIPS2PP)	+= logips2pp.o
 psmouse-$(CONFIG_MOUSE_PS2_LIFEBOOK)	+= lifebook.o
 psmouse-$(CONFIG_MOUSE_PS2_SENTELIC)	+= sentelic.o
drivers/input/mouse/hgpk.c deleted +0 -1063

1,063 lines not on this page · raw message

drivers/input/mouse/hgpk.h deleted +0 -61

61 lines not on this page · raw message

drivers/input/mouse/psmouse-base.c +1 -20
index 77ea7da3b1c5..e57d843d7b11 100644
@@ -26,7 +26,6 @@
 #include "synaptics.h"
 #include "logips2pp.h"
 #include "alps.h"
-#include "hgpk.h"
 #include "lifebook.h"
 #include "trackpoint.h"
 #include "touchkit_ps2.h"
@@ -393,9 +392,7 @@ static void psmouse_receive_byte(struct ps2dev *ps2dev, u8 data)
 			return;
 		}
 
-		if (psmouse->packet[1] == PSMOUSE_RET_ID ||
-		    (psmouse->protocol->type == PSMOUSE_HGPK &&
-		     psmouse->packet[1] == PSMOUSE_RET_BAT)) {
+		if (psmouse->packet[1] == PSMOUSE_RET_ID) {
 			__psmouse_set_state(psmouse, PSMOUSE_IGNORE);
 			serio_reconnect(ps2dev->serio);
 			return;
@@ -837,14 +834,6 @@ static const struct psmouse_protocol psmouse_protocols[] = {
 		.detect		= touchkit_ps2_detect,
 	},
 #endif
-#ifdef CONFIG_MOUSE_PS2_OLPC
-	{
-		.type		= PSMOUSE_HGPK,
-		.name		= "OLPC HGPK",
-		.alias		= "hgpk",
-		.detect		= hgpk_detect,
-	},
-#endif
 #ifdef CONFIG_MOUSE_PS2_ELANTECH
 	{
 		.type		= PSMOUSE_ELANTECH,
@@ -1153,13 +1142,6 @@ static int psmouse_extensions(struct psmouse *psmouse,
 			return PSMOUSE_ALPS;
 	}
 
-	/* Try OLPC HGPK touchpad */
-	if (max_proto > PSMOUSE_IMEX &&
-	    psmouse_try_protocol(psmouse, PSMOUSE_HGPK, &max_proto,
-				 set_properties, true)) {
-		return PSMOUSE_HGPK;
-	}
-
 	/* Try Elantech touchpad */
 	if (max_proto > PSMOUSE_IMEX &&
 	    psmouse_try_protocol(psmouse, PSMOUSE_ELANTECH,
@@ -2035,7 +2017,6 @@ static int __init psmouse_init(void)
 
 	lifebook_module_init();
 	synaptics_module_init();
-	hgpk_module_init();
 
 	err = psmouse_smbus_module_init();
 	if (err)
drivers/input/mouse/psmouse.h +1 -1
index 4d8acfe0d82a..783201301e5c 100644
@@ -59,7 +59,7 @@ enum psmouse_type {
 	PSMOUSE_TRACKPOINT,
 	PSMOUSE_TOUCHKIT_PS2,
 	PSMOUSE_CORTRON,
-	PSMOUSE_HGPK,
+	PSMOUSE_HGPK,		/* No longer used */
 	PSMOUSE_ELANTECH,
 	PSMOUSE_FSP,
 	PSMOUSE_SYNAPTICS_RELATIVE,
Signature · 5 lines
2.53.0.473.g4a7958ca14-goog


-- 
Dmitry
Acked-by on v1 1/1
#1 lore raw

That seems fair. I haven't had access to OLPC hardware in just about as long. If you need it:

Quoted 40 lines · Dmitry Torokhov

The protocol flavor for ALPS touchpads found in OLPC laptops has been broken since 2015 commit c378b5119eb0 ("Input: psmouse - factor out common protocol probing code") that forgot to add hgpk_init() to HGPK entry in psmouse_protocols array.

Since nobody complained for 10 years let's remove it.

---
  drivers/input/mouse/Kconfig        |   10 -
  drivers/input/mouse/Makefile       |    1 -
  drivers/input/mouse/hgpk.c         | 1063 ----------------------------
  drivers/input/mouse/hgpk.h         |   61 --
  drivers/input/mouse/psmouse-base.c |   21 +-
  drivers/input/mouse/psmouse.h      |    2 +-
  6 files changed, 2 insertions(+), 1156 deletions(-)
drivers/input/mouse/Kconfig +0 -10
index 833b643f0616..30d119d4634b 100644
@@ -164,16 +164,6 @@ config MOUSE_PS2_TOUCHKIT
 
  	  If unsure, say N.
 
-config MOUSE_PS2_OLPC
-	bool "OLPC PS/2 mouse protocol extension"
-	depends on MOUSE_PS2 && OLPC
-	help
-	  Say Y here if you have an OLPC XO-1 laptop (with built-in
-	  PS/2 touchpad/tablet device).  The manufacturer calls the
-	  touchpad an HGPK.
-
-	  If unsure, say N.
-
  config MOUSE_PS2_FOCALTECH
  	bool "FocalTech PS/2 mouse protocol extension" if EXPERT
  	default y
drivers/input/mouse/Makefile +0 -0
index a1336d5bee6f..137ed0c32d90 100644