linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: pcf50633-input - Remove
@ 2025-06-29 21:28 linux
  2025-06-30  5:05 ` Dmitry Torokhov
  0 siblings, 1 reply; 6+ messages in thread
From: linux @ 2025-06-29 21:28 UTC (permalink / raw)
  To: dmitry.torokhov, lee, linux-input, arnd
  Cc: linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

The pcf50633 was used as part of the OpenMoko devices but
the support for its main chip was recently removed in:
commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")

Remove the input code.

This was originally posted as a set of pcf50633 removals in March,
and is the only major component that hasn't been picked up.
https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/input/misc/Kconfig          |   7 --
 drivers/input/misc/Makefile         |   1 -
 drivers/input/misc/pcf50633-input.c | 113 ----------------------------
 3 files changed, 121 deletions(-)
 delete mode 100644 drivers/input/misc/pcf50633-input.c

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index f5496ca0c0d2..0fb21c99a5e3 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -584,13 +584,6 @@ config INPUT_PALMAS_PWRBUTTON
 	  To compile this driver as a module, choose M here. The module will
 	  be called palmas_pwrbutton.
 
-config INPUT_PCF50633_PMU
-	tristate "PCF50633 PMU events"
-	depends on MFD_PCF50633
-	help
-	 Say Y to include support for delivering  PMU events via  input
-	 layer on NXP PCF50633.
-
 config INPUT_PCF8574
 	tristate "PCF8574 Keypad input device"
 	depends on I2C
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index 6d91804d0a6f..d468c8140b93 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -59,7 +59,6 @@ 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_PCF50633_PMU)	+= pcf50633-input.o
 obj-$(CONFIG_INPUT_PCF8574)		+= pcf8574_keypad.o
 obj-$(CONFIG_INPUT_PCSPKR)		+= pcspkr.o
 obj-$(CONFIG_INPUT_PM8941_PWRKEY)	+= pm8941-pwrkey.o
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c
deleted file mode 100644
index 6d046e236ba6..000000000000
--- a/drivers/input/misc/pcf50633-input.c
+++ /dev/null
@@ -1,113 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/* NXP PCF50633 Input Driver
- *
- * (C) 2006-2008 by Openmoko, Inc.
- * Author: Balaji Rao <balajirrao@openmoko.org>
- * All rights reserved.
- *
- * Broken down from monstrous PCF50633 driver mainly by
- * Harald Welte, Andy Green and Werner Almesberger
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/slab.h>
-
-#include <linux/mfd/pcf50633/core.h>
-
-#define PCF50633_OOCSTAT_ONKEY	0x01
-#define PCF50633_REG_OOCSTAT	0x12
-#define PCF50633_REG_OOCMODE	0x10
-
-struct pcf50633_input {
-	struct pcf50633 *pcf;
-	struct input_dev *input_dev;
-};
-
-static void
-pcf50633_input_irq(int irq, void *data)
-{
-	struct pcf50633_input *input;
-	int onkey_released;
-
-	input = data;
-
-	/* We report only one event depending on the key press status */
-	onkey_released = pcf50633_reg_read(input->pcf, PCF50633_REG_OOCSTAT)
-						& PCF50633_OOCSTAT_ONKEY;
-
-	if (irq == PCF50633_IRQ_ONKEYF && !onkey_released)
-		input_report_key(input->input_dev, KEY_POWER, 1);
-	else if (irq == PCF50633_IRQ_ONKEYR && onkey_released)
-		input_report_key(input->input_dev, KEY_POWER, 0);
-
-	input_sync(input->input_dev);
-}
-
-static int pcf50633_input_probe(struct platform_device *pdev)
-{
-	struct pcf50633_input *input;
-	struct input_dev *input_dev;
-	int ret;
-
-
-	input = kzalloc(sizeof(*input), GFP_KERNEL);
-	if (!input)
-		return -ENOMEM;
-
-	input_dev = input_allocate_device();
-	if (!input_dev) {
-		kfree(input);
-		return -ENOMEM;
-	}
-
-	platform_set_drvdata(pdev, input);
-	input->pcf = dev_to_pcf50633(pdev->dev.parent);
-	input->input_dev = input_dev;
-
-	input_dev->name = "PCF50633 PMU events";
-	input_dev->id.bustype = BUS_I2C;
-	input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR);
-	set_bit(KEY_POWER, input_dev->keybit);
-
-	ret = input_register_device(input_dev);
-	if (ret) {
-		input_free_device(input_dev);
-		kfree(input);
-		return ret;
-	}
-	pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYR,
-				pcf50633_input_irq, input);
-	pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYF,
-				pcf50633_input_irq, input);
-
-	return 0;
-}
-
-static void pcf50633_input_remove(struct platform_device *pdev)
-{
-	struct pcf50633_input *input  = platform_get_drvdata(pdev);
-
-	pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYR);
-	pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYF);
-
-	input_unregister_device(input->input_dev);
-	kfree(input);
-}
-
-static struct platform_driver pcf50633_input_driver = {
-	.driver = {
-		.name = "pcf50633-input",
-	},
-	.probe = pcf50633_input_probe,
-	.remove = pcf50633_input_remove,
-};
-module_platform_driver(pcf50633_input_driver);
-
-MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>");
-MODULE_DESCRIPTION("PCF50633 input driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pcf50633-input");
-- 
2.50.0


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

* Re: [PATCH] Input: pcf50633-input - Remove
  2025-06-29 21:28 [PATCH] Input: pcf50633-input - Remove linux
@ 2025-06-30  5:05 ` Dmitry Torokhov
  2025-06-30 11:10   ` Dr. David Alan Gilbert
  2025-07-01 14:58   ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2025-06-30  5:05 UTC (permalink / raw)
  To: linux; +Cc: lee, linux-input, arnd, linux-kernel

On Sun, Jun 29, 2025 at 10:28:20PM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> The pcf50633 was used as part of the OpenMoko devices but
> the support for its main chip was recently removed in:
> commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")
> 
> Remove the input code.
> 
> This was originally posted as a set of pcf50633 removals in March,
> and is the only major component that hasn't been picked up.
> https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Applied, thank you.

-- 
Dmitry

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

* Re: [PATCH] Input: pcf50633-input - Remove
  2025-06-30  5:05 ` Dmitry Torokhov
@ 2025-06-30 11:10   ` Dr. David Alan Gilbert
  2025-07-01 14:58   ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2025-06-30 11:10 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: lee, linux-input, arnd, linux-kernel

* Dmitry Torokhov (dmitry.torokhov@gmail.com) wrote:
> On Sun, Jun 29, 2025 at 10:28:20PM +0100, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > 
> > The pcf50633 was used as part of the OpenMoko devices but
> > the support for its main chip was recently removed in:
> > commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")
> > 
> > Remove the input code.
> > 
> > This was originally posted as a set of pcf50633 removals in March,
> > and is the only major component that hasn't been picked up.
> > https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/
> > 
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> Applied, thank you.

Thanks!

Dave
> -- 
> Dmitry
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

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

* Re: [PATCH] Input: pcf50633-input - Remove
  2025-06-30  5:05 ` Dmitry Torokhov
  2025-06-30 11:10   ` Dr. David Alan Gilbert
@ 2025-07-01 14:58   ` Dr. David Alan Gilbert
  2025-07-01 18:10     ` Dmitry Torokhov
  1 sibling, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2025-07-01 14:58 UTC (permalink / raw)
  To: lee; +Cc: kernel.org, arnd, Dmitry Torokhov, linux-kernel

Lee:

* Dmitry Torokhov (dmitry.torokhov@gmail.com) wrote:
> On Sun, Jun 29, 2025 at 10:28:20PM +0100, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > 
> > The pcf50633 was used as part of the OpenMoko devices but
> > the support for its main chip was recently removed in:
> > commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")
> > 
> > Remove the input code.
> > 
> > This was originally posted as a set of pcf50633 removals in March,
> > and is the only major component that hasn't been picked up.
> > https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/
> > 
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> Applied, thank you.

I see Dmitry has got that into -next, so I've posted a patch to take
out the pcf50633 header which is the last bit left.

Dave

> -- 
> Dmitry
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

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

* Re: [PATCH] Input: pcf50633-input - Remove
  2025-07-01 14:58   ` Dr. David Alan Gilbert
@ 2025-07-01 18:10     ` Dmitry Torokhov
  2025-07-02 14:55       ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Torokhov @ 2025-07-01 18:10 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: lee, kernel.org, arnd, linux-kernel

On Tue, Jul 01, 2025 at 02:58:06PM +0000, Dr. David Alan Gilbert wrote:
> Lee:
> 
> * Dmitry Torokhov (dmitry.torokhov@gmail.com) wrote:
> > On Sun, Jun 29, 2025 at 10:28:20PM +0100, linux@treblig.org wrote:
> > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > > 
> > > The pcf50633 was used as part of the OpenMoko devices but
> > > the support for its main chip was recently removed in:
> > > commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")
> > > 
> > > Remove the input code.
> > > 
> > > This was originally posted as a set of pcf50633 removals in March,
> > > and is the only major component that hasn't been picked up.
> > > https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/
> > > 
> > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > 
> > Applied, thank you.
> 
> I see Dmitry has got that into -next, so I've posted a patch to take
> out the pcf50633 header which is the last bit left.

Lee, do you want me to take it through my tree as well to avoid juggling
inter-tree dependencies?

Thanks.

-- 
Dmitry

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

* Re: [PATCH] Input: pcf50633-input - Remove
  2025-07-01 18:10     ` Dmitry Torokhov
@ 2025-07-02 14:55       ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2025-07-02 14:55 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Dr. David Alan Gilbert, kernel.org, arnd, linux-kernel

On Tue, 01 Jul 2025, Dmitry Torokhov wrote:

> On Tue, Jul 01, 2025 at 02:58:06PM +0000, Dr. David Alan Gilbert wrote:
> > Lee:
> > 
> > * Dmitry Torokhov (dmitry.torokhov@gmail.com) wrote:
> > > On Sun, Jun 29, 2025 at 10:28:20PM +0100, linux@treblig.org wrote:
> > > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > > > 
> > > > The pcf50633 was used as part of the OpenMoko devices but
> > > > the support for its main chip was recently removed in:
> > > > commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support")
> > > > 
> > > > Remove the input code.
> > > > 
> > > > This was originally posted as a set of pcf50633 removals in March,
> > > > and is the only major component that hasn't been picked up.
> > > > https://lore.kernel.org/all/20250311014959.743322-1-linux@treblig.org/
> > > > 
> > > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > > 
> > > Applied, thank you.
> > 
> > I see Dmitry has got that into -next, so I've posted a patch to take
> > out the pcf50633 header which is the last bit left.
> 
> Lee, do you want me to take it through my tree as well to avoid juggling
> inter-tree dependencies?

If the driver is unused, it shouldn't cause too many issues.  Let's
ensure that all of these get applied for this cycle and all should be
well.

-- 
Lee Jones [李琼斯]

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

end of thread, other threads:[~2025-07-02 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-29 21:28 [PATCH] Input: pcf50633-input - Remove linux
2025-06-30  5:05 ` Dmitry Torokhov
2025-06-30 11:10   ` Dr. David Alan Gilbert
2025-07-01 14:58   ` Dr. David Alan Gilbert
2025-07-01 18:10     ` Dmitry Torokhov
2025-07-02 14:55       ` Lee Jones

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).