* [PATCH 1/2] Input: pcap_keys: remove unused driver
@ 2026-04-30 16:42 Arnd Bergmann
2026-04-30 16:42 ` [PATCH 2/2] input: pcap_ts - " Arnd Bergmann
2026-05-01 4:36 ` [PATCH 1/2] Input: pcap_keys: " Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-04-30 16:42 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Arnd Bergmann, Lee Jones, linux-kernel, linux-input
From: Arnd Bergmann <arnd@arndb.de>
Support for the ezx series of phones was removed in 2022, this
driver is just dead code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/input/misc/Kconfig | 10 ---
drivers/input/misc/Makefile | 1 -
drivers/input/misc/pcap_keys.c | 125 ---------------------------------
3 files changed, 136 deletions(-)
delete mode 100644 drivers/input/misc/pcap_keys.c
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 94a753fcb64f..1f6c57dba030 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -745,16 +745,6 @@ config INPUT_WM831X_ON
To compile this driver as a module, choose M here: the module
will be called wm831x_on.
-config INPUT_PCAP
- tristate "Motorola EZX PCAP misc input events"
- depends on EZX_PCAP
- help
- Say Y here if you want to use Power key and Headphone button
- on Motorola EZX phones.
-
- To compile this driver as a module, choose M here: the
- module will be called pcap_keys.
-
config INPUT_ADXL34X
tristate "Analog Devices ADXL34x Three-Axis Digital Accelerometer"
default n
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index 415fc4e2918b..2281d6803fce 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -60,7 +60,6 @@ obj-$(CONFIG_INPUT_MAX8997_HAPTIC) += max8997_haptic.o
obj-$(CONFIG_INPUT_MC13783_PWRBUTTON) += mc13783-pwrbutton.o
obj-$(CONFIG_INPUT_MMA8450) += mma8450.o
obj-$(CONFIG_INPUT_PALMAS_PWRBUTTON) += palmas-pwrbutton.o
-obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o
obj-$(CONFIG_INPUT_PCF8574) += pcf8574_keypad.o
obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o
obj-$(CONFIG_INPUT_PF1550_ONKEY) += pf1550-onkey.o
diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c
deleted file mode 100644
index b19899b50d0b..000000000000
--- a/drivers/input/misc/pcap_keys.c
+++ /dev/null
@@ -1,125 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Input driver for PCAP events:
- * * Power key
- * * Headphone button
- *
- * Copyright (c) 2008,2009 Ilya Petrov <ilya.muromec@gmail.com>
- */
-
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/mfd/ezx-pcap.h>
-#include <linux/slab.h>
-
-struct pcap_keys {
- struct pcap_chip *pcap;
- struct input_dev *input;
-};
-
-/* PCAP2 interrupts us on keypress */
-static irqreturn_t pcap_keys_handler(int irq, void *_pcap_keys)
-{
- struct pcap_keys *pcap_keys = _pcap_keys;
- int pirq = irq_to_pcap(pcap_keys->pcap, irq);
- u32 pstat;
-
- ezx_pcap_read(pcap_keys->pcap, PCAP_REG_PSTAT, &pstat);
- pstat &= 1 << pirq;
-
- switch (pirq) {
- case PCAP_IRQ_ONOFF:
- input_report_key(pcap_keys->input, KEY_POWER, !pstat);
- break;
- case PCAP_IRQ_MIC:
- input_report_key(pcap_keys->input, KEY_HP, !pstat);
- break;
- }
-
- input_sync(pcap_keys->input);
-
- return IRQ_HANDLED;
-}
-
-static int pcap_keys_probe(struct platform_device *pdev)
-{
- int err = -ENOMEM;
- struct pcap_keys *pcap_keys;
- struct input_dev *input_dev;
-
- pcap_keys = kmalloc_obj(*pcap_keys);
- if (!pcap_keys)
- return err;
-
- pcap_keys->pcap = dev_get_drvdata(pdev->dev.parent);
-
- input_dev = input_allocate_device();
- if (!input_dev)
- goto fail;
-
- pcap_keys->input = input_dev;
-
- platform_set_drvdata(pdev, pcap_keys);
- input_dev->name = pdev->name;
- input_dev->phys = "pcap-keys/input0";
- input_dev->id.bustype = BUS_HOST;
- input_dev->dev.parent = &pdev->dev;
-
- __set_bit(EV_KEY, input_dev->evbit);
- __set_bit(KEY_POWER, input_dev->keybit);
- __set_bit(KEY_HP, input_dev->keybit);
-
- err = input_register_device(input_dev);
- if (err)
- goto fail_allocate;
-
- err = request_irq(pcap_to_irq(pcap_keys->pcap, PCAP_IRQ_ONOFF),
- pcap_keys_handler, 0, "Power key", pcap_keys);
- if (err)
- goto fail_register;
-
- err = request_irq(pcap_to_irq(pcap_keys->pcap, PCAP_IRQ_MIC),
- pcap_keys_handler, 0, "Headphone button", pcap_keys);
- if (err)
- goto fail_pwrkey;
-
- return 0;
-
-fail_pwrkey:
- free_irq(pcap_to_irq(pcap_keys->pcap, PCAP_IRQ_ONOFF), pcap_keys);
-fail_register:
- input_unregister_device(input_dev);
- goto fail;
-fail_allocate:
- input_free_device(input_dev);
-fail:
- kfree(pcap_keys);
- return err;
-}
-
-static void pcap_keys_remove(struct platform_device *pdev)
-{
- struct pcap_keys *pcap_keys = platform_get_drvdata(pdev);
-
- free_irq(pcap_to_irq(pcap_keys->pcap, PCAP_IRQ_ONOFF), pcap_keys);
- free_irq(pcap_to_irq(pcap_keys->pcap, PCAP_IRQ_MIC), pcap_keys);
-
- input_unregister_device(pcap_keys->input);
- kfree(pcap_keys);
-}
-
-static struct platform_driver pcap_keys_device_driver = {
- .probe = pcap_keys_probe,
- .remove = pcap_keys_remove,
- .driver = {
- .name = "pcap-keys",
- }
-};
-module_platform_driver(pcap_keys_device_driver);
-
-MODULE_DESCRIPTION("Motorola PCAP2 input events driver");
-MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pcap_keys");
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] input: pcap_ts - remove unused driver
2026-04-30 16:42 [PATCH 1/2] Input: pcap_keys: remove unused driver Arnd Bergmann
@ 2026-04-30 16:42 ` Arnd Bergmann
2026-05-01 4:36 ` Dmitry Torokhov
2026-05-01 4:36 ` [PATCH 1/2] Input: pcap_keys: " Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2026-04-30 16:42 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Arnd Bergmann, linux-kernel, linux-input
From: Arnd Bergmann <arnd@arndb.de>
Support for the ezx series of phones was removed in 2022, this
driver is just dead code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/input/touchscreen/Kconfig | 10 --
drivers/input/touchscreen/Makefile | 1 -
drivers/input/touchscreen/pcap_ts.c | 252 ----------------------------
3 files changed, 263 deletions(-)
delete mode 100644 drivers/input/touchscreen/pcap_ts.c
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index aeaf9a9cbb41..484522d8d675 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -1178,16 +1178,6 @@ config TOUCHSCREEN_TSC2007_IIO
or ambient light monitoring), temperature and raw input
values.
-config TOUCHSCREEN_PCAP
- tristate "Motorola PCAP touchscreen"
- depends on EZX_PCAP
- help
- Say Y here if you have a Motorola EZX telephone and
- want to enable support for the built-in touchscreen.
-
- To compile this driver as a module, choose M here: the
- module will be called pcap_ts.
-
config TOUCHSCREEN_RM_TS
tristate "Raydium I2C Touchscreen"
depends on I2C
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index f2b002abebe8..6d397268d2e3 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -74,7 +74,6 @@ obj-$(CONFIG_TOUCHSCREEN_HP7XX) += jornada720_ts.o
obj-$(CONFIG_TOUCHSCREEN_IPAQ_MICRO) += ipaq-micro-ts.o
obj-$(CONFIG_TOUCHSCREEN_HTCPEN) += htcpen.o
obj-$(CONFIG_TOUCHSCREEN_USB_COMPOSITE) += usbtouchscreen.o
-obj-$(CONFIG_TOUCHSCREEN_PCAP) += pcap_ts.o
obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o
obj-$(CONFIG_TOUCHSCREEN_PIXCIR) += pixcir_i2c_ts.o
obj-$(CONFIG_TOUCHSCREEN_RM_TS) += raydium_i2c_ts.o
diff --git a/drivers/input/touchscreen/pcap_ts.c b/drivers/input/touchscreen/pcap_ts.c
deleted file mode 100644
index 7b89eb74b9de..000000000000
--- a/drivers/input/touchscreen/pcap_ts.c
+++ /dev/null
@@ -1,252 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Driver for Motorola PCAP2 touchscreen as found in the EZX phone platform.
- *
- * Copyright (C) 2006 Harald Welte <laforge@openezx.org>
- * Copyright (C) 2009 Daniel Ribeiro <drwyrm@gmail.com>
- */
-
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-#include <linux/pm.h>
-#include <linux/timer.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/mfd/ezx-pcap.h>
-
-struct pcap_ts {
- struct pcap_chip *pcap;
- struct input_dev *input;
- struct delayed_work work;
- u16 x, y;
- u16 pressure;
- u8 read_state;
-};
-
-#define SAMPLE_DELAY 20 /* msecs */
-
-#define X_AXIS_MIN 0
-#define X_AXIS_MAX 1023
-#define Y_AXIS_MAX X_AXIS_MAX
-#define Y_AXIS_MIN X_AXIS_MIN
-#define PRESSURE_MAX X_AXIS_MAX
-#define PRESSURE_MIN X_AXIS_MIN
-
-static void pcap_ts_read_xy(void *data, u16 res[2])
-{
- struct pcap_ts *pcap_ts = data;
-
- switch (pcap_ts->read_state) {
- case PCAP_ADC_TS_M_PRESSURE:
- /* pressure reading is unreliable */
- if (res[0] > PRESSURE_MIN && res[0] < PRESSURE_MAX)
- pcap_ts->pressure = res[0];
- pcap_ts->read_state = PCAP_ADC_TS_M_XY;
- schedule_delayed_work(&pcap_ts->work, 0);
- break;
- case PCAP_ADC_TS_M_XY:
- pcap_ts->y = res[0];
- pcap_ts->x = res[1];
- if (pcap_ts->x <= X_AXIS_MIN || pcap_ts->x >= X_AXIS_MAX ||
- pcap_ts->y <= Y_AXIS_MIN || pcap_ts->y >= Y_AXIS_MAX) {
- /* pen has been released */
- input_report_abs(pcap_ts->input, ABS_PRESSURE, 0);
- input_report_key(pcap_ts->input, BTN_TOUCH, 0);
-
- pcap_ts->read_state = PCAP_ADC_TS_M_STANDBY;
- schedule_delayed_work(&pcap_ts->work, 0);
- } else {
- /* pen is touching the screen */
- input_report_abs(pcap_ts->input, ABS_X, pcap_ts->x);
- input_report_abs(pcap_ts->input, ABS_Y, pcap_ts->y);
- input_report_key(pcap_ts->input, BTN_TOUCH, 1);
- input_report_abs(pcap_ts->input, ABS_PRESSURE,
- pcap_ts->pressure);
-
- /* switch back to pressure read mode */
- pcap_ts->read_state = PCAP_ADC_TS_M_PRESSURE;
- schedule_delayed_work(&pcap_ts->work,
- msecs_to_jiffies(SAMPLE_DELAY));
- }
- input_sync(pcap_ts->input);
- break;
- default:
- dev_warn(&pcap_ts->input->dev,
- "pcap_ts: Warning, unhandled read_state %d\n",
- pcap_ts->read_state);
- break;
- }
-}
-
-static void pcap_ts_work(struct work_struct *work)
-{
- struct delayed_work *dw = to_delayed_work(work);
- struct pcap_ts *pcap_ts = container_of(dw, struct pcap_ts, work);
- u8 ch[2];
-
- pcap_set_ts_bits(pcap_ts->pcap,
- pcap_ts->read_state << PCAP_ADC_TS_M_SHIFT);
-
- if (pcap_ts->read_state == PCAP_ADC_TS_M_STANDBY)
- return;
-
- /* start adc conversion */
- ch[0] = PCAP_ADC_CH_TS_X1;
- ch[1] = PCAP_ADC_CH_TS_Y1;
- pcap_adc_async(pcap_ts->pcap, PCAP_ADC_BANK_1, 0, ch,
- pcap_ts_read_xy, pcap_ts);
-}
-
-static irqreturn_t pcap_ts_event_touch(int pirq, void *data)
-{
- struct pcap_ts *pcap_ts = data;
-
- if (pcap_ts->read_state == PCAP_ADC_TS_M_STANDBY) {
- pcap_ts->read_state = PCAP_ADC_TS_M_PRESSURE;
- schedule_delayed_work(&pcap_ts->work, 0);
- }
- return IRQ_HANDLED;
-}
-
-static int pcap_ts_open(struct input_dev *dev)
-{
- struct pcap_ts *pcap_ts = input_get_drvdata(dev);
-
- pcap_ts->read_state = PCAP_ADC_TS_M_STANDBY;
- schedule_delayed_work(&pcap_ts->work, 0);
-
- return 0;
-}
-
-static void pcap_ts_close(struct input_dev *dev)
-{
- struct pcap_ts *pcap_ts = input_get_drvdata(dev);
-
- cancel_delayed_work_sync(&pcap_ts->work);
-
- pcap_ts->read_state = PCAP_ADC_TS_M_NONTS;
- pcap_set_ts_bits(pcap_ts->pcap,
- pcap_ts->read_state << PCAP_ADC_TS_M_SHIFT);
-}
-
-static int pcap_ts_probe(struct platform_device *pdev)
-{
- struct input_dev *input_dev;
- struct pcap_ts *pcap_ts;
- int err = -ENOMEM;
-
- pcap_ts = kzalloc_obj(*pcap_ts);
- if (!pcap_ts)
- return err;
-
- pcap_ts->pcap = dev_get_drvdata(pdev->dev.parent);
- platform_set_drvdata(pdev, pcap_ts);
-
- input_dev = input_allocate_device();
- if (!input_dev)
- goto fail;
-
- INIT_DELAYED_WORK(&pcap_ts->work, pcap_ts_work);
-
- pcap_ts->read_state = PCAP_ADC_TS_M_NONTS;
- pcap_set_ts_bits(pcap_ts->pcap,
- pcap_ts->read_state << PCAP_ADC_TS_M_SHIFT);
-
- pcap_ts->input = input_dev;
- input_set_drvdata(input_dev, pcap_ts);
-
- input_dev->name = "pcap-touchscreen";
- input_dev->phys = "pcap_ts/input0";
- input_dev->id.bustype = BUS_HOST;
- input_dev->id.vendor = 0x0001;
- input_dev->id.product = 0x0002;
- input_dev->id.version = 0x0100;
- input_dev->dev.parent = &pdev->dev;
- input_dev->open = pcap_ts_open;
- input_dev->close = pcap_ts_close;
-
- input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
- input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
- input_set_abs_params(input_dev, ABS_X, X_AXIS_MIN, X_AXIS_MAX, 0, 0);
- input_set_abs_params(input_dev, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, 0, 0);
- input_set_abs_params(input_dev, ABS_PRESSURE, PRESSURE_MIN,
- PRESSURE_MAX, 0, 0);
-
- err = input_register_device(pcap_ts->input);
- if (err)
- goto fail_allocate;
-
- err = request_irq(pcap_to_irq(pcap_ts->pcap, PCAP_IRQ_TS),
- pcap_ts_event_touch, 0, "Touch Screen", pcap_ts);
- if (err)
- goto fail_register;
-
- return 0;
-
-fail_register:
- input_unregister_device(input_dev);
- goto fail;
-fail_allocate:
- input_free_device(input_dev);
-fail:
- kfree(pcap_ts);
-
- return err;
-}
-
-static void pcap_ts_remove(struct platform_device *pdev)
-{
- struct pcap_ts *pcap_ts = platform_get_drvdata(pdev);
-
- free_irq(pcap_to_irq(pcap_ts->pcap, PCAP_IRQ_TS), pcap_ts);
- cancel_delayed_work_sync(&pcap_ts->work);
-
- input_unregister_device(pcap_ts->input);
-
- kfree(pcap_ts);
-}
-
-#ifdef CONFIG_PM
-static int pcap_ts_suspend(struct device *dev)
-{
- struct pcap_ts *pcap_ts = dev_get_drvdata(dev);
-
- pcap_set_ts_bits(pcap_ts->pcap, PCAP_ADC_TS_REF_LOWPWR);
- return 0;
-}
-
-static int pcap_ts_resume(struct device *dev)
-{
- struct pcap_ts *pcap_ts = dev_get_drvdata(dev);
-
- pcap_set_ts_bits(pcap_ts->pcap,
- pcap_ts->read_state << PCAP_ADC_TS_M_SHIFT);
- return 0;
-}
-
-static const struct dev_pm_ops pcap_ts_pm_ops = {
- .suspend = pcap_ts_suspend,
- .resume = pcap_ts_resume,
-};
-#define PCAP_TS_PM_OPS (&pcap_ts_pm_ops)
-#else
-#define PCAP_TS_PM_OPS NULL
-#endif
-
-static struct platform_driver pcap_ts_driver = {
- .probe = pcap_ts_probe,
- .remove = pcap_ts_remove,
- .driver = {
- .name = "pcap-ts",
- .pm = PCAP_TS_PM_OPS,
- },
-};
-module_platform_driver(pcap_ts_driver);
-
-MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver");
-MODULE_AUTHOR("Daniel Ribeiro / Harald Welte");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pcap_ts");
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] input: pcap_ts - remove unused driver
2026-04-30 16:42 ` [PATCH 2/2] input: pcap_ts - " Arnd Bergmann
@ 2026-05-01 4:36 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-05-01 4:36 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Arnd Bergmann, linux-kernel, linux-input
On Thu, Apr 30, 2026 at 06:42:48PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Support for the ezx series of phones was removed in 2022, this
> driver is just dead code.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thank you!
From sashiko:
"Does removing this config leave a dangling CONFIG_TOUCHSCREEN_PCAP=m
entry in arch/arm/configs/pxa_defconfig? Would it be better to clean up
that entry as well to avoid a defconfig warning?"
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Input: pcap_keys: remove unused driver
2026-04-30 16:42 [PATCH 1/2] Input: pcap_keys: remove unused driver Arnd Bergmann
2026-04-30 16:42 ` [PATCH 2/2] input: pcap_ts - " Arnd Bergmann
@ 2026-05-01 4:36 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-05-01 4:36 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Arnd Bergmann, Lee Jones, linux-kernel, linux-input
On Thu, Apr 30, 2026 at 06:42:47PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Support for the ezx series of phones was removed in 2022, this
> driver is just dead code.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-01 4:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 16:42 [PATCH 1/2] Input: pcap_keys: remove unused driver Arnd Bergmann
2026-04-30 16:42 ` [PATCH 2/2] input: pcap_ts - " Arnd Bergmann
2026-05-01 4:36 ` Dmitry Torokhov
2026-05-01 4:36 ` [PATCH 1/2] Input: pcap_keys: " Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox