linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Removal of a few obsolete input drivers
@ 2024-08-08 17:27 Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 1/5] Input: inport - remove driver Dmitry Torokhov
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

Hi,

I am wondering if it is not the time to retire bus mice drivers since
they have been out of favor for close to 30 years, as well as 3 drivers
for portables from late '90s to early 2000.

Please let me know what you think.

Thanks,
Dmitry

Dmitry Torokhov (5):
  Input: inport - remove driver
  Input: logibm - remove driver
  Input: pc110pad - remove driver
  Input: mk712 - remove driver
  Input: ct82c710 - remove driver

 drivers/input/mouse/Kconfig        |  36 -----
 drivers/input/mouse/Makefile       |   3 -
 drivers/input/mouse/inport.c       | 177 ---------------------
 drivers/input/mouse/logibm.c       | 166 --------------------
 drivers/input/mouse/pc110pad.c     | 160 -------------------
 drivers/input/serio/Kconfig        |  13 --
 drivers/input/serio/Makefile       |   1 -
 drivers/input/serio/ct82c710.c     | 239 -----------------------------
 drivers/input/touchscreen/Kconfig  |  12 --
 drivers/input/touchscreen/Makefile |   1 -
 drivers/input/touchscreen/mk712.c  | 215 --------------------------
 11 files changed, 1023 deletions(-)
 delete mode 100644 drivers/input/mouse/inport.c
 delete mode 100644 drivers/input/mouse/logibm.c
 delete mode 100644 drivers/input/mouse/pc110pad.c
 delete mode 100644 drivers/input/serio/ct82c710.c
 delete mode 100644 drivers/input/touchscreen/mk712.c

-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [RFC PATCH 1/5] Input: inport - remove driver
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
@ 2024-08-08 17:27 ` Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 2/5] Input: logibm " Dmitry Torokhov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

Inport (ATI XL and Microsoft) mice use specialized bus interface
implemented via an ISA add-in card. Have been superseded by PS/2 and
then USB, and are historical curiosity by now.

Remove the driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/mouse/Kconfig  |  16 ----
 drivers/input/mouse/Makefile |   1 -
 drivers/input/mouse/inport.c | 177 -----------------------------------
 3 files changed, 194 deletions(-)
 delete mode 100644 drivers/input/mouse/inport.c

diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 8a27a20d04b0..9c3102fa8e3c 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -312,22 +312,6 @@ config MOUSE_ELAN_I2C_SMBUS
 
 	   If unsure, say Y.
 
-config MOUSE_INPORT
-	tristate "InPort/MS/ATIXL busmouse"
-	depends on ISA
-	help
-	  Say Y here if you have an InPort, Microsoft or ATI XL busmouse.
-	  They are rather rare these days.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called inport.
-
-config MOUSE_ATIXL
-	bool "ATI XL variant"
-	depends on MOUSE_INPORT
-	help
-	  Say Y here if your mouse is of the ATI XL variety.
-
 config MOUSE_LOGIBM
 	tristate "Logitech busmouse"
 	depends on ISA
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index 563029551529..ef96db1fc945 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_MOUSE_BCM5974)		+= bcm5974.o
 obj-$(CONFIG_MOUSE_CYAPA)		+= cyapatp.o
 obj-$(CONFIG_MOUSE_ELAN_I2C)		+= elan_i2c.o
 obj-$(CONFIG_MOUSE_GPIO)		+= gpio_mouse.o
-obj-$(CONFIG_MOUSE_INPORT)		+= inport.o
 obj-$(CONFIG_MOUSE_LOGIBM)		+= logibm.o
 obj-$(CONFIG_MOUSE_MAPLE)		+= maplemouse.o
 obj-$(CONFIG_MOUSE_PC110PAD)		+= pc110pad.o
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
deleted file mode 100644
index 401d8bff8e84..000000000000
--- a/drivers/input/mouse/inport.c
+++ /dev/null
@@ -1,177 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *  Copyright (c) 1999-2001 Vojtech Pavlik
- *
- *  Based on the work of:
- *	Teemu Rantanen		Derrick Cole
- *	Peter Cervasio		Christoph Niemann
- *	Philip Blundell		Russell King
- *	Bob Harris
- */
-
-/*
- * Inport (ATI XL and Microsoft) busmouse driver for Linux
- */
-
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/input.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-
-MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Inport (ATI XL and Microsoft) busmouse driver");
-MODULE_LICENSE("GPL");
-
-#define INPORT_BASE		0x23c
-#define INPORT_EXTENT		4
-
-#define INPORT_CONTROL_PORT	INPORT_BASE + 0
-#define INPORT_DATA_PORT	INPORT_BASE + 1
-#define INPORT_SIGNATURE_PORT	INPORT_BASE + 2
-
-#define INPORT_REG_BTNS	0x00
-#define INPORT_REG_X		0x01
-#define INPORT_REG_Y		0x02
-#define INPORT_REG_MODE		0x07
-#define INPORT_RESET		0x80
-
-#ifdef CONFIG_MOUSE_ATIXL
-#define INPORT_NAME		"ATI XL Mouse"
-#define INPORT_VENDOR		0x0002
-#define INPORT_SPEED_30HZ	0x01
-#define INPORT_SPEED_50HZ	0x02
-#define INPORT_SPEED_100HZ	0x03
-#define INPORT_SPEED_200HZ	0x04
-#define INPORT_MODE_BASE	INPORT_SPEED_100HZ
-#define INPORT_MODE_IRQ		0x08
-#else
-#define INPORT_NAME		"Microsoft InPort Mouse"
-#define INPORT_VENDOR		0x0001
-#define INPORT_MODE_BASE	0x10
-#define INPORT_MODE_IRQ		0x01
-#endif
-#define INPORT_MODE_HOLD	0x20
-
-#define INPORT_IRQ		5
-
-static int inport_irq = INPORT_IRQ;
-module_param_hw_named(irq, inport_irq, uint, irq, 0);
-MODULE_PARM_DESC(irq, "IRQ number (5=default)");
-
-static struct input_dev *inport_dev;
-
-static irqreturn_t inport_interrupt(int irq, void *dev_id)
-{
-	unsigned char buttons;
-
-	outb(INPORT_REG_MODE, INPORT_CONTROL_PORT);
-	outb(INPORT_MODE_HOLD | INPORT_MODE_IRQ | INPORT_MODE_BASE, INPORT_DATA_PORT);
-
-	outb(INPORT_REG_X, INPORT_CONTROL_PORT);
-	input_report_rel(inport_dev, REL_X, inb(INPORT_DATA_PORT));
-
-	outb(INPORT_REG_Y, INPORT_CONTROL_PORT);
-	input_report_rel(inport_dev, REL_Y, inb(INPORT_DATA_PORT));
-
-	outb(INPORT_REG_BTNS, INPORT_CONTROL_PORT);
-	buttons = inb(INPORT_DATA_PORT);
-
-	input_report_key(inport_dev, BTN_MIDDLE, buttons & 1);
-	input_report_key(inport_dev, BTN_LEFT,   buttons & 2);
-	input_report_key(inport_dev, BTN_RIGHT,  buttons & 4);
-
-	outb(INPORT_REG_MODE, INPORT_CONTROL_PORT);
-	outb(INPORT_MODE_IRQ | INPORT_MODE_BASE, INPORT_DATA_PORT);
-
-	input_sync(inport_dev);
-	return IRQ_HANDLED;
-}
-
-static int inport_open(struct input_dev *dev)
-{
-	if (request_irq(inport_irq, inport_interrupt, 0, "inport", NULL))
-		return -EBUSY;
-	outb(INPORT_REG_MODE, INPORT_CONTROL_PORT);
-	outb(INPORT_MODE_IRQ | INPORT_MODE_BASE, INPORT_DATA_PORT);
-
-	return 0;
-}
-
-static void inport_close(struct input_dev *dev)
-{
-	outb(INPORT_REG_MODE, INPORT_CONTROL_PORT);
-	outb(INPORT_MODE_BASE, INPORT_DATA_PORT);
-	free_irq(inport_irq, NULL);
-}
-
-static int __init inport_init(void)
-{
-	unsigned char a, b, c;
-	int err;
-
-	if (!request_region(INPORT_BASE, INPORT_EXTENT, "inport")) {
-		printk(KERN_ERR "inport.c: Can't allocate ports at %#x\n", INPORT_BASE);
-		return -EBUSY;
-	}
-
-	a = inb(INPORT_SIGNATURE_PORT);
-	b = inb(INPORT_SIGNATURE_PORT);
-	c = inb(INPORT_SIGNATURE_PORT);
-	if (a == b || a != c) {
-		printk(KERN_INFO "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE);
-		err = -ENODEV;
-		goto err_release_region;
-	}
-
-	inport_dev = input_allocate_device();
-	if (!inport_dev) {
-		printk(KERN_ERR "inport.c: Not enough memory for input device\n");
-		err = -ENOMEM;
-		goto err_release_region;
-	}
-
-	inport_dev->name = INPORT_NAME;
-	inport_dev->phys = "isa023c/input0";
-	inport_dev->id.bustype = BUS_ISA;
-	inport_dev->id.vendor  = INPORT_VENDOR;
-	inport_dev->id.product = 0x0001;
-	inport_dev->id.version = 0x0100;
-
-	inport_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
-	inport_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) |
-		BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
-	inport_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
-
-	inport_dev->open  = inport_open;
-	inport_dev->close = inport_close;
-
-	outb(INPORT_RESET, INPORT_CONTROL_PORT);
-	outb(INPORT_REG_MODE, INPORT_CONTROL_PORT);
-	outb(INPORT_MODE_BASE, INPORT_DATA_PORT);
-
-	err = input_register_device(inport_dev);
-	if (err)
-		goto err_free_dev;
-
-	return 0;
-
- err_free_dev:
-	input_free_device(inport_dev);
- err_release_region:
-	release_region(INPORT_BASE, INPORT_EXTENT);
-
-	return err;
-}
-
-static void __exit inport_exit(void)
-{
-	input_unregister_device(inport_dev);
-	release_region(INPORT_BASE, INPORT_EXTENT);
-}
-
-module_init(inport_init);
-module_exit(inport_exit);
-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 2/5] Input: logibm - remove driver
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 1/5] Input: inport - remove driver Dmitry Torokhov
@ 2024-08-08 17:27 ` Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 3/5] Input: pc110pad " Dmitry Torokhov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

Bus mice use specialized bus interface implemented via an ISA add-in
cards. They were superseded by PS/2 and later USB.

Kconfig entry for the Logitech bus mice states that they "are rather
rare these days". This statement was true in 2002 and is no less true
in 2024.

Remove the driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/mouse/Kconfig  |  10 ---
 drivers/input/mouse/Makefile |   1 -
 drivers/input/mouse/logibm.c | 166 -----------------------------------
 3 files changed, 177 deletions(-)
 delete mode 100644 drivers/input/mouse/logibm.c

diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 9c3102fa8e3c..f660e6ba24c2 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -312,16 +312,6 @@ config MOUSE_ELAN_I2C_SMBUS
 
 	   If unsure, say Y.
 
-config MOUSE_LOGIBM
-	tristate "Logitech busmouse"
-	depends on ISA
-	help
-	  Say Y here if you have a Logitech busmouse.
-	  They are rather rare these days.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called logibm.
-
 config MOUSE_PC110PAD
 	tristate "IBM PC110 touchpad"
 	depends on ISA
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index ef96db1fc945..e745b64fed49 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_MOUSE_BCM5974)		+= bcm5974.o
 obj-$(CONFIG_MOUSE_CYAPA)		+= cyapatp.o
 obj-$(CONFIG_MOUSE_ELAN_I2C)		+= elan_i2c.o
 obj-$(CONFIG_MOUSE_GPIO)		+= gpio_mouse.o
-obj-$(CONFIG_MOUSE_LOGIBM)		+= logibm.o
 obj-$(CONFIG_MOUSE_MAPLE)		+= maplemouse.o
 obj-$(CONFIG_MOUSE_PC110PAD)		+= pc110pad.o
 obj-$(CONFIG_MOUSE_PS2)			+= psmouse.o
diff --git a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
deleted file mode 100644
index 0aab63dbc30a..000000000000
--- a/drivers/input/mouse/logibm.c
+++ /dev/null
@@ -1,166 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *  Copyright (c) 1999-2001 Vojtech Pavlik
- *
- *  Based on the work of:
- *	James Banks		Matthew Dillon
- *	David Giller		Nathan Laredo
- *	Linus Torvalds		Johan Myreen
- *	Cliff Matthews		Philip Blundell
- *	Russell King
- */
-
-/*
- * Logitech Bus Mouse Driver for Linux
- */
-
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/input.h>
-#include <linux/interrupt.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-
-MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Logitech busmouse driver");
-MODULE_LICENSE("GPL");
-
-#define	LOGIBM_BASE		0x23c
-#define	LOGIBM_EXTENT		4
-
-#define	LOGIBM_DATA_PORT	LOGIBM_BASE + 0
-#define	LOGIBM_SIGNATURE_PORT	LOGIBM_BASE + 1
-#define	LOGIBM_CONTROL_PORT	LOGIBM_BASE + 2
-#define	LOGIBM_CONFIG_PORT	LOGIBM_BASE + 3
-
-#define	LOGIBM_ENABLE_IRQ	0x00
-#define	LOGIBM_DISABLE_IRQ	0x10
-#define	LOGIBM_READ_X_LOW	0x80
-#define	LOGIBM_READ_X_HIGH	0xa0
-#define	LOGIBM_READ_Y_LOW	0xc0
-#define	LOGIBM_READ_Y_HIGH	0xe0
-
-#define LOGIBM_DEFAULT_MODE	0x90
-#define LOGIBM_CONFIG_BYTE	0x91
-#define LOGIBM_SIGNATURE_BYTE	0xa5
-
-#define LOGIBM_IRQ		5
-
-static int logibm_irq = LOGIBM_IRQ;
-module_param_hw_named(irq, logibm_irq, uint, irq, 0);
-MODULE_PARM_DESC(irq, "IRQ number (5=default)");
-
-static struct input_dev *logibm_dev;
-
-static irqreturn_t logibm_interrupt(int irq, void *dev_id)
-{
-	char dx, dy;
-	unsigned char buttons;
-
-	outb(LOGIBM_READ_X_LOW, LOGIBM_CONTROL_PORT);
-	dx = (inb(LOGIBM_DATA_PORT) & 0xf);
-	outb(LOGIBM_READ_X_HIGH, LOGIBM_CONTROL_PORT);
-	dx |= (inb(LOGIBM_DATA_PORT) & 0xf) << 4;
-	outb(LOGIBM_READ_Y_LOW, LOGIBM_CONTROL_PORT);
-	dy = (inb(LOGIBM_DATA_PORT) & 0xf);
-	outb(LOGIBM_READ_Y_HIGH, LOGIBM_CONTROL_PORT);
-	buttons = inb(LOGIBM_DATA_PORT);
-	dy |= (buttons & 0xf) << 4;
-	buttons = ~buttons >> 5;
-
-	input_report_rel(logibm_dev, REL_X, dx);
-	input_report_rel(logibm_dev, REL_Y, dy);
-	input_report_key(logibm_dev, BTN_RIGHT,  buttons & 1);
-	input_report_key(logibm_dev, BTN_MIDDLE, buttons & 2);
-	input_report_key(logibm_dev, BTN_LEFT,   buttons & 4);
-	input_sync(logibm_dev);
-
-	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
-	return IRQ_HANDLED;
-}
-
-static int logibm_open(struct input_dev *dev)
-{
-	if (request_irq(logibm_irq, logibm_interrupt, 0, "logibm", NULL)) {
-		printk(KERN_ERR "logibm.c: Can't allocate irq %d\n", logibm_irq);
-		return -EBUSY;
-	}
-	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
-	return 0;
-}
-
-static void logibm_close(struct input_dev *dev)
-{
-	outb(LOGIBM_DISABLE_IRQ, LOGIBM_CONTROL_PORT);
-	free_irq(logibm_irq, NULL);
-}
-
-static int __init logibm_init(void)
-{
-	int err;
-
-	if (!request_region(LOGIBM_BASE, LOGIBM_EXTENT, "logibm")) {
-		printk(KERN_ERR "logibm.c: Can't allocate ports at %#x\n", LOGIBM_BASE);
-		return -EBUSY;
-	}
-
-	outb(LOGIBM_CONFIG_BYTE, LOGIBM_CONFIG_PORT);
-	outb(LOGIBM_SIGNATURE_BYTE, LOGIBM_SIGNATURE_PORT);
-	udelay(100);
-
-	if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) {
-		printk(KERN_INFO "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE);
-		err = -ENODEV;
-		goto err_release_region;
-	}
-
-	outb(LOGIBM_DEFAULT_MODE, LOGIBM_CONFIG_PORT);
-	outb(LOGIBM_DISABLE_IRQ, LOGIBM_CONTROL_PORT);
-
-	logibm_dev = input_allocate_device();
-	if (!logibm_dev) {
-		printk(KERN_ERR "logibm.c: Not enough memory for input device\n");
-		err = -ENOMEM;
-		goto err_release_region;
-	}
-
-	logibm_dev->name = "Logitech bus mouse";
-	logibm_dev->phys = "isa023c/input0";
-	logibm_dev->id.bustype = BUS_ISA;
-	logibm_dev->id.vendor  = 0x0003;
-	logibm_dev->id.product = 0x0001;
-	logibm_dev->id.version = 0x0100;
-
-	logibm_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
-	logibm_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) |
-		BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
-	logibm_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);
-
-	logibm_dev->open  = logibm_open;
-	logibm_dev->close = logibm_close;
-
-	err = input_register_device(logibm_dev);
-	if (err)
-		goto err_free_dev;
-
-	return 0;
-
- err_free_dev:
-	input_free_device(logibm_dev);
- err_release_region:
-	release_region(LOGIBM_BASE, LOGIBM_EXTENT);
-
-	return err;
-}
-
-static void __exit logibm_exit(void)
-{
-	input_unregister_device(logibm_dev);
-	release_region(LOGIBM_BASE, LOGIBM_EXTENT);
-}
-
-module_init(logibm_init);
-module_exit(logibm_exit);
-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 3/5] Input: pc110pad - remove driver
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 1/5] Input: inport - remove driver Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 2/5] Input: logibm " Dmitry Torokhov
@ 2024-08-08 17:27 ` Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 4/5] Input: mk712 " Dmitry Torokhov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

Palm Top PC 110 is a handheld personal computer with 80486SX CPU that
was released exclusively in Japan in September 1995.

While the kernel still supports 486 CPU it is highly unlikely that
anyone is using this device with the latest kernel.

Remove the driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/mouse/Kconfig    |  10 ---
 drivers/input/mouse/Makefile   |   1 -
 drivers/input/mouse/pc110pad.c | 160 ---------------------------------
 3 files changed, 171 deletions(-)
 delete mode 100644 drivers/input/mouse/pc110pad.c

diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index f660e6ba24c2..7b7053c57588 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -312,16 +312,6 @@ config MOUSE_ELAN_I2C_SMBUS
 
 	   If unsure, say Y.
 
-config MOUSE_PC110PAD
-	tristate "IBM PC110 touchpad"
-	depends on ISA
-	help
-	  Say Y if you have the IBM PC-110 micro-notebook and want its
-	  touchpad supported.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called pc110pad.
-
 config MOUSE_AMIGA
 	tristate "Amiga mouse"
 	depends on AMIGA
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index e745b64fed49..4f9fb7d87a37 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -13,7 +13,6 @@ obj-$(CONFIG_MOUSE_CYAPA)		+= cyapatp.o
 obj-$(CONFIG_MOUSE_ELAN_I2C)		+= elan_i2c.o
 obj-$(CONFIG_MOUSE_GPIO)		+= gpio_mouse.o
 obj-$(CONFIG_MOUSE_MAPLE)		+= maplemouse.o
-obj-$(CONFIG_MOUSE_PC110PAD)		+= pc110pad.o
 obj-$(CONFIG_MOUSE_PS2)			+= psmouse.o
 obj-$(CONFIG_MOUSE_RISCPC)		+= rpcmouse.o
 obj-$(CONFIG_MOUSE_SERIAL)		+= sermouse.o
diff --git a/drivers/input/mouse/pc110pad.c b/drivers/input/mouse/pc110pad.c
deleted file mode 100644
index efa58049f746..000000000000
--- a/drivers/input/mouse/pc110pad.c
+++ /dev/null
@@ -1,160 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *  Copyright (c) 2000-2001 Vojtech Pavlik
- *
- *  Based on the work of:
- *	Alan Cox	Robin O'Leary
- */
-
-/*
- * IBM PC110 touchpad driver for Linux
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/input.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-
-MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("IBM PC110 touchpad driver");
-MODULE_LICENSE("GPL");
-
-#define PC110PAD_OFF	0x30
-#define PC110PAD_ON	0x38
-
-static int pc110pad_irq = 10;
-static int pc110pad_io = 0x15e0;
-
-static struct input_dev *pc110pad_dev;
-static int pc110pad_data[3];
-static int pc110pad_count;
-
-static irqreturn_t pc110pad_interrupt(int irq, void *ptr)
-{
-	int value     = inb_p(pc110pad_io);
-	int handshake = inb_p(pc110pad_io + 2);
-
-	outb(handshake |  1, pc110pad_io + 2);
-	udelay(2);
-	outb(handshake & ~1, pc110pad_io + 2);
-	udelay(2);
-	inb_p(0x64);
-
-	pc110pad_data[pc110pad_count++] = value;
-
-	if (pc110pad_count < 3)
-		return IRQ_HANDLED;
-
-	input_report_key(pc110pad_dev, BTN_TOUCH,
-		pc110pad_data[0] & 0x01);
-	input_report_abs(pc110pad_dev, ABS_X,
-		pc110pad_data[1] | ((pc110pad_data[0] << 3) & 0x80) | ((pc110pad_data[0] << 1) & 0x100));
-	input_report_abs(pc110pad_dev, ABS_Y,
-		pc110pad_data[2] | ((pc110pad_data[0] << 4) & 0x80));
-	input_sync(pc110pad_dev);
-
-	pc110pad_count = 0;
-	return IRQ_HANDLED;
-}
-
-static void pc110pad_close(struct input_dev *dev)
-{
-	outb(PC110PAD_OFF, pc110pad_io + 2);
-}
-
-static int pc110pad_open(struct input_dev *dev)
-{
-	pc110pad_interrupt(0, NULL);
-	pc110pad_interrupt(0, NULL);
-	pc110pad_interrupt(0, NULL);
-	outb(PC110PAD_ON, pc110pad_io + 2);
-	pc110pad_count = 0;
-
-	return 0;
-}
-
-/*
- * We try to avoid enabling the hardware if it's not
- * there, but we don't know how to test. But we do know
- * that the PC110 is not a PCI system. So if we find any
- * PCI devices in the machine, we don't have a PC110.
- */
-static int __init pc110pad_init(void)
-{
-	int err;
-
-	if (!no_pci_devices())
-		return -ENODEV;
-
-	if (!request_region(pc110pad_io, 4, "pc110pad")) {
-		printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
-				pc110pad_io, pc110pad_io + 4);
-		return -EBUSY;
-	}
-
-	outb(PC110PAD_OFF, pc110pad_io + 2);
-
-	if (request_irq(pc110pad_irq, pc110pad_interrupt, 0, "pc110pad", NULL)) {
-		printk(KERN_ERR "pc110pad: Unable to get irq %d.\n", pc110pad_irq);
-		err = -EBUSY;
-		goto err_release_region;
-	}
-
-	pc110pad_dev = input_allocate_device();
-	if (!pc110pad_dev) {
-		printk(KERN_ERR "pc110pad: Not enough memory.\n");
-		err = -ENOMEM;
-		goto err_free_irq;
-	}
-
-	pc110pad_dev->name = "IBM PC110 TouchPad";
-	pc110pad_dev->phys = "isa15e0/input0";
-	pc110pad_dev->id.bustype = BUS_ISA;
-	pc110pad_dev->id.vendor = 0x0003;
-	pc110pad_dev->id.product = 0x0001;
-	pc110pad_dev->id.version = 0x0100;
-
-	pc110pad_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
-	pc110pad_dev->absbit[0] = BIT_MASK(ABS_X) | BIT_MASK(ABS_Y);
-	pc110pad_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
-
-	input_abs_set_max(pc110pad_dev, ABS_X, 0x1ff);
-	input_abs_set_max(pc110pad_dev, ABS_Y, 0x0ff);
-
-	pc110pad_dev->open = pc110pad_open;
-	pc110pad_dev->close = pc110pad_close;
-
-	err = input_register_device(pc110pad_dev);
-	if (err)
-		goto err_free_dev;
-
-	return 0;
-
- err_free_dev:
-	input_free_device(pc110pad_dev);
- err_free_irq:
-	free_irq(pc110pad_irq, NULL);
- err_release_region:
-	release_region(pc110pad_io, 4);
-
-	return err;
-}
-
-static void __exit pc110pad_exit(void)
-{
-	outb(PC110PAD_OFF, pc110pad_io + 2);
-	free_irq(pc110pad_irq, NULL);
-	input_unregister_device(pc110pad_dev);
-	release_region(pc110pad_io, 4);
-}
-
-module_init(pc110pad_init);
-module_exit(pc110pad_exit);
-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 4/5] Input: mk712 - remove driver
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
                   ` (2 preceding siblings ...)
  2024-08-08 17:27 ` [RFC PATCH 3/5] Input: pc110pad " Dmitry Torokhov
@ 2024-08-08 17:27 ` Dmitry Torokhov
  2024-08-08 17:27 ` [RFC PATCH 5/5] Input: ct82c710 " Dmitry Torokhov
  2024-08-09  0:24 ` [RFC PATCH 0/5] Removal of a few obsolete input drivers Maciej W. Rozycki
  5 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

This touchscreen controller was used om Gateway AOL Connected Touchpad
released in 2000 and, according to Wikipedia, removed from the market
in October 2001 due to slow sales.

It looks like it can still be bought on eBay for $1000 but I really
doubt anyone will actually use it.

Remove the driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/Kconfig  |  12 --
 drivers/input/touchscreen/Makefile |   1 -
 drivers/input/touchscreen/mk712.c  | 215 -----------------------------
 3 files changed, 228 deletions(-)
 delete mode 100644 drivers/input/touchscreen/mk712.c

diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 1ac26fc2e3eb..4685660faaf6 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -687,18 +687,6 @@ config TOUCHSCREEN_INEXIO
 	  To compile this driver as a module, choose M here: the
 	  module will be called inexio.
 
-config TOUCHSCREEN_MK712
-	tristate "ICS MicroClock MK712 touchscreen"
-	depends on ISA
-	help
-	  Say Y here if you have the ICS MicroClock MK712 touchscreen
-	  controller chip in your system.
-
-	  If unsure, say N.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called mk712.
-
 config TOUCHSCREEN_HP600
 	tristate "HP Jornada 6xx touchscreen"
 	depends on SH_HP6XX && SH_ADC
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 82bc837ca01e..23d19ba7dc6e 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -65,7 +65,6 @@ obj-$(CONFIG_TOUCHSCREEN_MIGOR)		+= migor_ts.o
 obj-$(CONFIG_TOUCHSCREEN_MMS114)	+= mms114.o
 obj-$(CONFIG_TOUCHSCREEN_MSG2638)	+= msg2638.o
 obj-$(CONFIG_TOUCHSCREEN_MTOUCH)	+= mtouch.o
-obj-$(CONFIG_TOUCHSCREEN_MK712)		+= mk712.o
 obj-$(CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS)	+= novatek-nvt-ts.o
 obj-$(CONFIG_TOUCHSCREEN_HP600)		+= hp680_ts_input.o
 obj-$(CONFIG_TOUCHSCREEN_HP7XX)		+= jornada720_ts.o
diff --git a/drivers/input/touchscreen/mk712.c b/drivers/input/touchscreen/mk712.c
deleted file mode 100644
index 753d9cc1de1f..000000000000
--- a/drivers/input/touchscreen/mk712.c
+++ /dev/null
@@ -1,215 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * ICS MK712 touchscreen controller driver
- *
- * Copyright (c) 1999-2002 Transmeta Corporation
- * Copyright (c) 2005 Rick Koch <n1gp@hotmail.com>
- * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
- */
-
-
-/*
- * This driver supports the ICS MicroClock MK712 TouchScreen controller,
- * found in Gateway AOL Connected Touchpad computers.
- *
- * Documentation for ICS MK712 can be found at:
- *	https://www.idt.com/general-parts/mk712-touch-screen-controller
- */
-
-/*
- * 1999-12-18: original version, Daniel Quinlan
- * 1999-12-19: added anti-jitter code, report pen-up events, fixed mk712_poll
- *             to use queue_empty, Nathan Laredo
- * 1999-12-20: improved random point rejection, Nathan Laredo
- * 2000-01-05: checked in new anti-jitter code, changed mouse protocol, fixed
- *             queue code, added module options, other fixes, Daniel Quinlan
- * 2002-03-15: Clean up for kernel merge <alan@redhat.com>
- *             Fixed multi open race, fixed memory checks, fixed resource
- *             allocation, fixed close/powerdown bug, switched to new init
- * 2005-01-18: Ported to 2.6 from 2.4.28, Rick Koch
- * 2005-02-05: Rewritten for the input layer, Vojtech Pavlik
- *
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/input.h>
-#include <asm/io.h>
-
-MODULE_AUTHOR("Daniel Quinlan <quinlan@pathname.com>, Vojtech Pavlik <vojtech@suse.cz>");
-MODULE_DESCRIPTION("ICS MicroClock MK712 TouchScreen driver");
-MODULE_LICENSE("GPL");
-
-static unsigned int mk712_io = 0x260;	/* Also 0x200, 0x208, 0x300 */
-module_param_hw_named(io, mk712_io, uint, ioport, 0);
-MODULE_PARM_DESC(io, "I/O base address of MK712 touchscreen controller");
-
-static unsigned int mk712_irq = 10;	/* Also 12, 14, 15 */
-module_param_hw_named(irq, mk712_irq, uint, irq, 0);
-MODULE_PARM_DESC(irq, "IRQ of MK712 touchscreen controller");
-
-/* eight 8-bit registers */
-#define MK712_STATUS		0
-#define MK712_X			2
-#define MK712_Y			4
-#define MK712_CONTROL		6
-#define MK712_RATE		7
-
-/* status */
-#define	MK712_STATUS_TOUCH			0x10
-#define	MK712_CONVERSION_COMPLETE		0x80
-
-/* control */
-#define MK712_ENABLE_INT			0x01
-#define MK712_INT_ON_CONVERSION_COMPLETE	0x02
-#define MK712_INT_ON_CHANGE_IN_TOUCH_STATUS	0x04
-#define MK712_ENABLE_PERIODIC_CONVERSIONS	0x10
-#define MK712_READ_ONE_POINT			0x20
-#define MK712_POWERUP				0x40
-
-static struct input_dev *mk712_dev;
-static DEFINE_SPINLOCK(mk712_lock);
-
-static irqreturn_t mk712_interrupt(int irq, void *dev_id)
-{
-	unsigned char status;
-	static int debounce = 1;
-	static unsigned short last_x;
-	static unsigned short last_y;
-
-	spin_lock(&mk712_lock);
-
-	status = inb(mk712_io + MK712_STATUS);
-
-	if (~status & MK712_CONVERSION_COMPLETE) {
-		debounce = 1;
-		goto end;
-	}
-
-	if (~status & MK712_STATUS_TOUCH) {
-		debounce = 1;
-		input_report_key(mk712_dev, BTN_TOUCH, 0);
-		goto end;
-	}
-
-	if (debounce) {
-		debounce = 0;
-		goto end;
-	}
-
-	input_report_key(mk712_dev, BTN_TOUCH, 1);
-	input_report_abs(mk712_dev, ABS_X, last_x);
-	input_report_abs(mk712_dev, ABS_Y, last_y);
-
- end:
-	last_x = inw(mk712_io + MK712_X) & 0x0fff;
-	last_y = inw(mk712_io + MK712_Y) & 0x0fff;
-	input_sync(mk712_dev);
-	spin_unlock(&mk712_lock);
-	return IRQ_HANDLED;
-}
-
-static int mk712_open(struct input_dev *dev)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&mk712_lock, flags);
-
-	outb(0, mk712_io + MK712_CONTROL); /* Reset */
-
-	outb(MK712_ENABLE_INT | MK712_INT_ON_CONVERSION_COMPLETE |
-		MK712_INT_ON_CHANGE_IN_TOUCH_STATUS |
-		MK712_ENABLE_PERIODIC_CONVERSIONS |
-		MK712_POWERUP, mk712_io + MK712_CONTROL);
-
-	outb(10, mk712_io + MK712_RATE); /* 187 points per second */
-
-	spin_unlock_irqrestore(&mk712_lock, flags);
-
-	return 0;
-}
-
-static void mk712_close(struct input_dev *dev)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&mk712_lock, flags);
-
-	outb(0, mk712_io + MK712_CONTROL);
-
-	spin_unlock_irqrestore(&mk712_lock, flags);
-}
-
-static int __init mk712_init(void)
-{
-	int err;
-
-	if (!request_region(mk712_io, 8, "mk712")) {
-		printk(KERN_WARNING "mk712: unable to get IO region\n");
-		return -ENODEV;
-	}
-
-	outb(0, mk712_io + MK712_CONTROL);
-
-	if ((inw(mk712_io + MK712_X) & 0xf000) ||	/* Sanity check */
-	    (inw(mk712_io + MK712_Y) & 0xf000) ||
-	    (inw(mk712_io + MK712_STATUS) & 0xf333)) {
-		printk(KERN_WARNING "mk712: device not present\n");
-		err = -ENODEV;
-		goto fail1;
-	}
-
-	mk712_dev = input_allocate_device();
-	if (!mk712_dev) {
-		printk(KERN_ERR "mk712: not enough memory\n");
-		err = -ENOMEM;
-		goto fail1;
-	}
-
-	mk712_dev->name = "ICS MicroClock MK712 TouchScreen";
-	mk712_dev->phys = "isa0260/input0";
-	mk712_dev->id.bustype = BUS_ISA;
-	mk712_dev->id.vendor  = 0x0005;
-	mk712_dev->id.product = 0x0001;
-	mk712_dev->id.version = 0x0100;
-
-	mk712_dev->open    = mk712_open;
-	mk712_dev->close   = mk712_close;
-
-	mk712_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
-	mk712_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
-	input_set_abs_params(mk712_dev, ABS_X, 0, 0xfff, 88, 0);
-	input_set_abs_params(mk712_dev, ABS_Y, 0, 0xfff, 88, 0);
-
-	if (request_irq(mk712_irq, mk712_interrupt, 0, "mk712", mk712_dev)) {
-		printk(KERN_WARNING "mk712: unable to get IRQ\n");
-		err = -EBUSY;
-		goto fail1;
-	}
-
-	err = input_register_device(mk712_dev);
-	if (err)
-		goto fail2;
-
-	return 0;
-
- fail2:	free_irq(mk712_irq, mk712_dev);
- fail1:	input_free_device(mk712_dev);
-	release_region(mk712_io, 8);
-	return err;
-}
-
-static void __exit mk712_exit(void)
-{
-	input_unregister_device(mk712_dev);
-	free_irq(mk712_irq, mk712_dev);
-	release_region(mk712_io, 8);
-}
-
-module_init(mk712_init);
-module_exit(mk712_exit);
-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 5/5] Input: ct82c710 - remove driver
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
                   ` (3 preceding siblings ...)
  2024-08-08 17:27 ` [RFC PATCH 4/5] Input: mk712 " Dmitry Torokhov
@ 2024-08-08 17:27 ` Dmitry Torokhov
  2024-08-09  0:24 ` [RFC PATCH 0/5] Removal of a few obsolete input drivers Maciej W. Rozycki
  5 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-08 17:27 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel, Vojtech Pavlik, Jiri Kosina, Benjamin Tissoires

This is a PS/2 mouse interface chip from Chips & Technologies that was
used in TI TravelMate and Gateway Nomad laptops, which used 386 and 486
CPUs. While the kernel still supports 486 CPU it is highly unlikely that
anyone is using these devices with the latest kernel.

Remove the driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/serio/Kconfig    |  13 --
 drivers/input/serio/Makefile   |   1 -
 drivers/input/serio/ct82c710.c | 239 ---------------------------------
 3 files changed, 253 deletions(-)
 delete mode 100644 drivers/input/serio/ct82c710.c

diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index 17edc1597446..cf449f7cbaa5 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -55,19 +55,6 @@ config SERIO_SERPORT
 	  To compile this driver as a module, choose M here: the
 	  module will be called serport.
 
-config SERIO_CT82C710
-	tristate "ct82c710 Aux port controller"
-	depends on X86
-	help
-	  Say Y here if you have a Texas Instruments TravelMate notebook
-	  equipped with the ct82c710 chip and want to use a mouse connected
-	  to the "QuickPort".
-
-	  If unsure, say N.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called ct82c710.
-
 config SERIO_Q40KBD
 	tristate "Q40 keyboard controller"
 	depends on Q40
diff --git a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile
index 6d97bad7b844..8ab98f4aa28d 100644
--- a/drivers/input/serio/Makefile
+++ b/drivers/input/serio/Makefile
@@ -9,7 +9,6 @@ obj-$(CONFIG_SERIO)		+= serio.o
 obj-$(CONFIG_SERIO_I8042)	+= i8042.o
 obj-$(CONFIG_SERIO_PARKBD)	+= parkbd.o
 obj-$(CONFIG_SERIO_SERPORT)	+= serport.o
-obj-$(CONFIG_SERIO_CT82C710)	+= ct82c710.o
 obj-$(CONFIG_SERIO_RPCKBD)	+= rpckbd.o
 obj-$(CONFIG_SERIO_SA1111)	+= sa1111ps2.o
 obj-$(CONFIG_SERIO_AMBAKMI)	+= ambakmi.o
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c
deleted file mode 100644
index 6834440b37f6..000000000000
--- a/drivers/input/serio/ct82c710.c
+++ /dev/null
@@ -1,239 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *  Copyright (c) 1999-2001 Vojtech Pavlik
- */
-
-/*
- *  82C710 C&T mouse port chip driver for Linux
- */
-
-#include <linux/delay.h>
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/serio.h>
-#include <linux/errno.h>
-#include <linux/err.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
-
-#include <asm/io.h>
-
-MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("82C710 C&T mouse port chip driver");
-MODULE_LICENSE("GPL");
-
-/*
- * ct82c710 interface
- */
-
-#define CT82C710_DEV_IDLE     0x01		/* Device Idle */
-#define CT82C710_RX_FULL      0x02		/* Device Char received */
-#define CT82C710_TX_IDLE      0x04		/* Device XMIT Idle */
-#define CT82C710_RESET        0x08		/* Device Reset */
-#define CT82C710_INTS_ON      0x10		/* Device Interrupt On */
-#define CT82C710_ERROR_FLAG   0x20		/* Device Error */
-#define CT82C710_CLEAR        0x40		/* Device Clear */
-#define CT82C710_ENABLE       0x80		/* Device Enable */
-
-#define CT82C710_IRQ          12
-
-#define CT82C710_DATA         ct82c710_iores.start
-#define CT82C710_STATUS       (ct82c710_iores.start + 1)
-
-static struct serio *ct82c710_port;
-static struct platform_device *ct82c710_device;
-static struct resource ct82c710_iores;
-
-/*
- * Interrupt handler for the 82C710 mouse port. A character
- * is waiting in the 82C710.
- */
-
-static irqreturn_t ct82c710_interrupt(int cpl, void *dev_id)
-{
-	return serio_interrupt(ct82c710_port, inb(CT82C710_DATA), 0);
-}
-
-/*
- * Wait for device to send output char and flush any input char.
- */
-
-static int ct82c170_wait(void)
-{
-	int timeout = 60000;
-
-	while ((inb(CT82C710_STATUS) & (CT82C710_RX_FULL | CT82C710_TX_IDLE | CT82C710_DEV_IDLE))
-		       != (CT82C710_DEV_IDLE | CT82C710_TX_IDLE) && timeout) {
-
-		if (inb_p(CT82C710_STATUS) & CT82C710_RX_FULL) inb_p(CT82C710_DATA);
-
-		udelay(1);
-		timeout--;
-	}
-
-	return !timeout;
-}
-
-static void ct82c710_close(struct serio *serio)
-{
-	if (ct82c170_wait())
-		printk(KERN_WARNING "ct82c710.c: Device busy in close()\n");
-
-	outb_p(inb_p(CT82C710_STATUS) & ~(CT82C710_ENABLE | CT82C710_INTS_ON), CT82C710_STATUS);
-
-	if (ct82c170_wait())
-		printk(KERN_WARNING "ct82c710.c: Device busy in close()\n");
-
-	free_irq(CT82C710_IRQ, NULL);
-}
-
-static int ct82c710_open(struct serio *serio)
-{
-	unsigned char status;
-	int err;
-
-	err = request_irq(CT82C710_IRQ, ct82c710_interrupt, 0, "ct82c710", NULL);
-	if (err)
-		return err;
-
-	status = inb_p(CT82C710_STATUS);
-
-	status |= (CT82C710_ENABLE | CT82C710_RESET);
-	outb_p(status, CT82C710_STATUS);
-
-	status &= ~(CT82C710_RESET);
-	outb_p(status, CT82C710_STATUS);
-
-	status |= CT82C710_INTS_ON;
-	outb_p(status, CT82C710_STATUS);	/* Enable interrupts */
-
-	while (ct82c170_wait()) {
-		printk(KERN_ERR "ct82c710: Device busy in open()\n");
-		status &= ~(CT82C710_ENABLE | CT82C710_INTS_ON);
-		outb_p(status, CT82C710_STATUS);
-		free_irq(CT82C710_IRQ, NULL);
-		return -EBUSY;
-	}
-
-	return 0;
-}
-
-/*
- * Write to the 82C710 mouse device.
- */
-
-static int ct82c710_write(struct serio *port, unsigned char c)
-{
-	if (ct82c170_wait()) return -1;
-	outb_p(c, CT82C710_DATA);
-	return 0;
-}
-
-/*
- * See if we can find a 82C710 device. Read mouse address.
- */
-
-static int __init ct82c710_detect(void)
-{
-	outb_p(0x55, 0x2fa);				/* Any value except 9, ff or 36 */
-	outb_p(0xaa, 0x3fa);				/* Inverse of 55 */
-	outb_p(0x36, 0x3fa);				/* Address the chip */
-	outb_p(0xe4, 0x3fa);				/* 390/4; 390 = config address */
-	outb_p(0x1b, 0x2fa);				/* Inverse of e4 */
-	outb_p(0x0f, 0x390);				/* Write index */
-	if (inb_p(0x391) != 0xe4)			/* Config address found? */
-		return -ENODEV;				/* No: no 82C710 here */
-
-	outb_p(0x0d, 0x390);				/* Write index */
-	ct82c710_iores.start = inb_p(0x391) << 2;	/* Get mouse I/O address */
-	ct82c710_iores.end = ct82c710_iores.start + 1;
-	ct82c710_iores.flags = IORESOURCE_IO;
-	outb_p(0x0f, 0x390);
-	outb_p(0x0f, 0x391);				/* Close config mode */
-
-	return 0;
-}
-
-static int ct82c710_probe(struct platform_device *dev)
-{
-	ct82c710_port = kzalloc(sizeof(*ct82c710_port), GFP_KERNEL);
-	if (!ct82c710_port)
-		return -ENOMEM;
-
-	ct82c710_port->id.type = SERIO_8042;
-	ct82c710_port->dev.parent = &dev->dev;
-	ct82c710_port->open = ct82c710_open;
-	ct82c710_port->close = ct82c710_close;
-	ct82c710_port->write = ct82c710_write;
-	strscpy(ct82c710_port->name, "C&T 82c710 mouse port",
-		sizeof(ct82c710_port->name));
-	snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys),
-		 "isa%16llx/serio0", (unsigned long long)CT82C710_DATA);
-
-	serio_register_port(ct82c710_port);
-
-	printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n",
-		(unsigned long long)CT82C710_DATA, CT82C710_IRQ);
-
-	return 0;
-}
-
-static void ct82c710_remove(struct platform_device *dev)
-{
-	serio_unregister_port(ct82c710_port);
-}
-
-static struct platform_driver ct82c710_driver = {
-	.driver		= {
-		.name	= "ct82c710",
-	},
-	.probe		= ct82c710_probe,
-	.remove_new	= ct82c710_remove,
-};
-
-
-static int __init ct82c710_init(void)
-{
-	int error;
-
-	error = ct82c710_detect();
-	if (error)
-		return error;
-
-	error = platform_driver_register(&ct82c710_driver);
-	if (error)
-		return error;
-
-	ct82c710_device = platform_device_alloc("ct82c710", -1);
-	if (!ct82c710_device) {
-		error = -ENOMEM;
-		goto err_unregister_driver;
-	}
-
-	error = platform_device_add_resources(ct82c710_device, &ct82c710_iores, 1);
-	if (error)
-		goto err_free_device;
-
-	error = platform_device_add(ct82c710_device);
-	if (error)
-		goto err_free_device;
-
-	return 0;
-
- err_free_device:
-	platform_device_put(ct82c710_device);
- err_unregister_driver:
-	platform_driver_unregister(&ct82c710_driver);
-	return error;
-}
-
-static void __exit ct82c710_exit(void)
-{
-	platform_device_unregister(ct82c710_device);
-	platform_driver_unregister(&ct82c710_driver);
-}
-
-module_init(ct82c710_init);
-module_exit(ct82c710_exit);
-- 
2.46.0.76.ge559c4bf1a-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
                   ` (4 preceding siblings ...)
  2024-08-08 17:27 ` [RFC PATCH 5/5] Input: ct82c710 " Dmitry Torokhov
@ 2024-08-09  0:24 ` Maciej W. Rozycki
  2024-08-12  4:50   ` Dmitry Torokhov
  5 siblings, 1 reply; 12+ messages in thread
From: Maciej W. Rozycki @ 2024-08-09  0:24 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Thu, 8 Aug 2024, Dmitry Torokhov wrote:

> I am wondering if it is not the time to retire bus mice drivers since
> they have been out of favor for close to 30 years, as well as 3 drivers
> for portables from late '90s to early 2000.

 Are these drivers broken, e.g. fail to compile or crash the system?  
Otherwise what's the gain from removal?

  Maciej

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-09  0:24 ` [RFC PATCH 0/5] Removal of a few obsolete input drivers Maciej W. Rozycki
@ 2024-08-12  4:50   ` Dmitry Torokhov
  2024-08-12 13:53     ` Maciej W. Rozycki
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-12  4:50 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Fri, Aug 09, 2024 at 01:24:42AM +0100, Maciej W. Rozycki wrote:
> On Thu, 8 Aug 2024, Dmitry Torokhov wrote:
> 
> > I am wondering if it is not the time to retire bus mice drivers since
> > they have been out of favor for close to 30 years, as well as 3 drivers
> > for portables from late '90s to early 2000.
> 
>  Are these drivers broken, e.g. fail to compile or crash the system?  

I have no idea because I doubt that anyone has tested them since
forever.

> Otherwise what's the gain from removal?

The same gain that we get from removing obsolete boards and
architectures - less maintenance burden, less work when we need to
change some APIs, less energy burnt by 0-day and other bots, CI systems,
etc, compiling useless drivers over and over and over.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-12  4:50   ` Dmitry Torokhov
@ 2024-08-12 13:53     ` Maciej W. Rozycki
  2024-08-12 16:46       ` Dmitry Torokhov
  0 siblings, 1 reply; 12+ messages in thread
From: Maciej W. Rozycki @ 2024-08-12 13:53 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Sun, 11 Aug 2024, Dmitry Torokhov wrote:

> > > I am wondering if it is not the time to retire bus mice drivers since
> > > they have been out of favor for close to 30 years, as well as 3 drivers
> > > for portables from late '90s to early 2000.
> > 
> >  Are these drivers broken, e.g. fail to compile or crash the system?  
> 
> I have no idea because I doubt that anyone has tested them since
> forever.

 What's the rationale for your conclusion?  How do you know nobody uses 
them?

> > Otherwise what's the gain from removal?
> 
> The same gain that we get from removing obsolete boards and
> architectures - less maintenance burden, less work when we need to
> change some APIs, less energy burnt by 0-day and other bots, CI systems,
> etc, compiling useless drivers over and over and over.

 Well, you don't have do do anything about these drivers, do you?  They 
don't scream for food.  And as to the energy, well I doubt this really 
matters, the amount is noise lost in the overall consumption.

  Maciej

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-12 13:53     ` Maciej W. Rozycki
@ 2024-08-12 16:46       ` Dmitry Torokhov
  2024-08-15 21:20         ` Maciej W. Rozycki
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Torokhov @ 2024-08-12 16:46 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Mon, Aug 12, 2024 at 02:53:30PM +0100, Maciej W. Rozycki wrote:
> On Sun, 11 Aug 2024, Dmitry Torokhov wrote:
> 
> > > > I am wondering if it is not the time to retire bus mice drivers since
> > > > they have been out of favor for close to 30 years, as well as 3 drivers
> > > > for portables from late '90s to early 2000.
> > > 
> > >  Are these drivers broken, e.g. fail to compile or crash the system?  
> > 
> > I have no idea because I doubt that anyone has tested them since
> > forever.
> 
>  What's the rationale for your conclusion?  How do you know nobody uses 
> them?

Because they are either require ISA add-on cards and it is quite hard to
find devices that still work, and are supported by the current kernel,
or internal peripherals in devices that are no longer useful. Do you
expect anyone using "Gateway AOL Connected Touchpad" in the year of our
Lord 2024?

> 
> > > Otherwise what's the gain from removal?
> > 
> > The same gain that we get from removing obsolete boards and
> > architectures - less maintenance burden, less work when we need to
> > change some APIs, less energy burnt by 0-day and other bots, CI systems,
> > etc, compiling useless drivers over and over and over.
> 
>  Well, you don't have do do anything about these drivers, do you?  They 
> don't scream for food.  And as to the energy, well I doubt this really 
> matters, the amount is noise lost in the overall consumption.

I kind of do even if they did not require much involvement.

Let me ask this: why do you want to keep them? Do you know of a large
(or small) userbase of bus mice enthusiasts? Note that it would be very
easy to "git revert" the removal if someone actually needs this.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-12 16:46       ` Dmitry Torokhov
@ 2024-08-15 21:20         ` Maciej W. Rozycki
  2024-10-22 20:55           ` Dmitry Torokhov
  0 siblings, 1 reply; 12+ messages in thread
From: Maciej W. Rozycki @ 2024-08-15 21:20 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Mon, 12 Aug 2024, Dmitry Torokhov wrote:

> > > >  Are these drivers broken, e.g. fail to compile or crash the system?  
> > > 
> > > I have no idea because I doubt that anyone has tested them since
> > > forever.
> > 
> >  What's the rationale for your conclusion?  How do you know nobody uses 
> > them?
> 
> Because they are either require ISA add-on cards and it is quite hard to
> find devices that still work, and are supported by the current kernel,
> or internal peripherals in devices that are no longer useful. Do you
> expect anyone using "Gateway AOL Connected Touchpad" in the year of our
> Lord 2024?

 Maybe, maybe not.

 I certainly use Linux with actual ISA hardware, i.e. systems with ISA or 
EISA slots and option cards within, as well as other hardware dating back 
to 1989.  I'm told people use Linux with m68k hardware going back in time 
even further.  I don't use any of the bus mice themselves though (having 
had perhaps a more common serial mouse instead), but if the drivers build 
just fine, then I fail to see a reason to dump them.

> > > The same gain that we get from removing obsolete boards and
> > > architectures - less maintenance burden, less work when we need to
> > > change some APIs, less energy burnt by 0-day and other bots, CI systems,
> > > etc, compiling useless drivers over and over and over.
> > 
> >  Well, you don't have do do anything about these drivers, do you?  They 
> > don't scream for food.  And as to the energy, well I doubt this really 
> > matters, the amount is noise lost in the overall consumption.
> 
> I kind of do even if they did not require much involvement.
> 
> Let me ask this: why do you want to keep them? Do you know of a large
> (or small) userbase of bus mice enthusiasts? Note that it would be very
> easy to "git revert" the removal if someone actually needs this.

 There is burden involved as well as repo clutter from going through an 
apply/revert cycle though.

 Sometimes we do want to discard code, because it causes burden elsewhere.  
It was the case with the removal of support for the original 80386 CPU due 
to its lack of user page write-protection in the kernel mode, which in 
turn required us to have explicit checks carefully sprinkled throughout 
and painfully maintained.  That hindered generic code and was a good 
argument in favour to removal as soon as 80386 became unimportant enough.

 In this case the decision seems arbitrary, the presence of these drivers 
does not hurt anything else.  I agree it might well be that nobody uses 
them anymore (though someone may come across a relevant piece of hardware 
anytime and wish to try it with Linux; I do it from time to time, and I 
also have old stuff even I'd like to write entirely new drivers for if I 
ever find some time for that, i.e. I have sorted higher priority stuff), 
which I can sort of recognise as an argument in favour of discarding them.

 I'm not entirely convinced it's enough of an argument by itself, however 
if there are other people who think otherwise, can we please at least do 
it in stages such as some other projects do?  That is require an explicit 
action for any interested party to keep the drivers enabled, say by hiding 
them behind CONFIG_DEPRECATED or suchlike (with clear documentation saying 
it's for stuff slated for removal), wait a year or two, and only if nobody 
speaks out during that period, then actually retire the code in question?

 A part of the joy with Linux for me and I believe other people as well it 
has been the ability to do odd stuff just for the sake of it.  It used not 
to be business back in 1990s and it still not is, not at least entirely, 
for such a Linux old-timer as I have now oddly enough become.

  Maciej

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 0/5] Removal of a few obsolete input drivers
  2024-08-15 21:20         ` Maciej W. Rozycki
@ 2024-10-22 20:55           ` Dmitry Torokhov
  0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Torokhov @ 2024-10-22 20:55 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: linux-input, linux-kernel, Vojtech Pavlik, Jiri Kosina,
	Benjamin Tissoires

On Thu, Aug 15, 2024 at 10:20:49PM +0100, Maciej W. Rozycki wrote:
> On Mon, 12 Aug 2024, Dmitry Torokhov wrote:
> 
> > > > >  Are these drivers broken, e.g. fail to compile or crash the system?  
> > > > 
> > > > I have no idea because I doubt that anyone has tested them since
> > > > forever.
> > > 
> > >  What's the rationale for your conclusion?  How do you know nobody uses 
> > > them?
> > 
> > Because they are either require ISA add-on cards and it is quite hard to
> > find devices that still work, and are supported by the current kernel,
> > or internal peripherals in devices that are no longer useful. Do you
> > expect anyone using "Gateway AOL Connected Touchpad" in the year of our
> > Lord 2024?
> 
>  Maybe, maybe not.
> 
>  I certainly use Linux with actual ISA hardware, i.e. systems with ISA or 
> EISA slots and option cards within, as well as other hardware dating back 
> to 1989.  I'm told people use Linux with m68k hardware going back in time 
> even further.  I don't use any of the bus mice themselves though (having 
> had perhaps a more common serial mouse instead), but if the drivers build 
> just fine, then I fail to see a reason to dump them.

OK, so here is an example:

https://lore.kernel.org/all/20241010194533.GA575181@bhelgaas/

We need to cleanup PCI core and the driver uses a hack. So we need
to patch it.

> 
> > > > The same gain that we get from removing obsolete boards and
> > > > architectures - less maintenance burden, less work when we need to
> > > > change some APIs, less energy burnt by 0-day and other bots, CI systems,
> > > > etc, compiling useless drivers over and over and over.
> > > 
> > >  Well, you don't have do do anything about these drivers, do you?  They 
> > > don't scream for food.  And as to the energy, well I doubt this really 
> > > matters, the amount is noise lost in the overall consumption.
> > 
> > I kind of do even if they did not require much involvement.
> > 
> > Let me ask this: why do you want to keep them? Do you know of a large
> > (or small) userbase of bus mice enthusiasts? Note that it would be very
> > easy to "git revert" the removal if someone actually needs this.
> 
>  There is burden involved as well as repo clutter from going through an 
> apply/revert cycle though.

You are assuming that somebody actually needs them and will have to
restore them.

> 
>  Sometimes we do want to discard code, because it causes burden elsewhere.  
> It was the case with the removal of support for the original 80386 CPU due 
> to its lack of user page write-protection in the kernel mode, which in 
> turn required us to have explicit checks carefully sprinkled throughout 
> and painfully maintained.  That hindered generic code and was a good 
> argument in favour to removal as soon as 80386 became unimportant enough.
> 
>  In this case the decision seems arbitrary, the presence of these drivers 
> does not hurt anything else.  I agree it might well be that nobody uses 
> them anymore (though someone may come across a relevant piece of hardware 
> anytime and wish to try it with Linux; I do it from time to time, and I 
> also have old stuff even I'd like to write entirely new drivers for if I 
> ever find some time for that, i.e. I have sorted higher priority stuff), 
> which I can sort of recognise as an argument in favour of discarding them.
> 
>  I'm not entirely convinced it's enough of an argument by itself, however 
> if there are other people who think otherwise, can we please at least do 
> it in stages such as some other projects do?  That is require an explicit 
> action for any interested party to keep the drivers enabled, say by hiding 
> them behind CONFIG_DEPRECATED or suchlike (with clear documentation saying 
> it's for stuff slated for removal), wait a year or two, and only if nobody 
> speaks out during that period, then actually retire the code in question?

I do not see how CONFIG_DEPRECATED help any better than revert. The
driver will disappear, people will start looking for it and will
complain on Linux Input/LKML. At which point we will revert either the
config change or driver removal patch.

If the argument that with config someone does not need git tree but
rather can work with a tarball I say I really do not care for this case.

> 
>  A part of the joy with Linux for me and I believe other people as well it 
> has been the ability to do odd stuff just for the sake of it.  It used not 
> to be business back in 1990s and it still not is, not at least entirely, 
> for such a Linux old-timer as I have now oddly enough become.

We are still willing to support old hardware, but only when it is
actually used.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-10-22 20:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 17:27 [RFC PATCH 0/5] Removal of a few obsolete input drivers Dmitry Torokhov
2024-08-08 17:27 ` [RFC PATCH 1/5] Input: inport - remove driver Dmitry Torokhov
2024-08-08 17:27 ` [RFC PATCH 2/5] Input: logibm " Dmitry Torokhov
2024-08-08 17:27 ` [RFC PATCH 3/5] Input: pc110pad " Dmitry Torokhov
2024-08-08 17:27 ` [RFC PATCH 4/5] Input: mk712 " Dmitry Torokhov
2024-08-08 17:27 ` [RFC PATCH 5/5] Input: ct82c710 " Dmitry Torokhov
2024-08-09  0:24 ` [RFC PATCH 0/5] Removal of a few obsolete input drivers Maciej W. Rozycki
2024-08-12  4:50   ` Dmitry Torokhov
2024-08-12 13:53     ` Maciej W. Rozycki
2024-08-12 16:46       ` Dmitry Torokhov
2024-08-15 21:20         ` Maciej W. Rozycki
2024-10-22 20:55           ` 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).