Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: pcf50633-input - remove the driver

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

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>
Link: https://lore.kernel.org/r/20250629212820.319584-1-linux@treblig.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Dr. David Alan Gilbert and committed by
Dmitry Torokhov
fc75e51e 409fe0ce

-121
-7
drivers/input/misc/Kconfig
··· 584 584 To compile this driver as a module, choose M here. The module will 585 585 be called palmas_pwrbutton. 586 586 587 - config INPUT_PCF50633_PMU 588 - tristate "PCF50633 PMU events" 589 - depends on MFD_PCF50633 590 - help 591 - Say Y to include support for delivering PMU events via input 592 - layer on NXP PCF50633. 593 - 594 587 config INPUT_PCF8574 595 588 tristate "PCF8574 Keypad input device" 596 589 depends on I2C
-1
drivers/input/misc/Makefile
··· 59 59 obj-$(CONFIG_INPUT_MMA8450) += mma8450.o 60 60 obj-$(CONFIG_INPUT_PALMAS_PWRBUTTON) += palmas-pwrbutton.o 61 61 obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o 62 - obj-$(CONFIG_INPUT_PCF50633_PMU) += pcf50633-input.o 63 62 obj-$(CONFIG_INPUT_PCF8574) += pcf8574_keypad.o 64 63 obj-$(CONFIG_INPUT_PCSPKR) += pcspkr.o 65 64 obj-$(CONFIG_INPUT_PM8941_PWRKEY) += pm8941-pwrkey.o
-113
drivers/input/misc/pcf50633-input.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-or-later 2 - /* NXP PCF50633 Input Driver 3 - * 4 - * (C) 2006-2008 by Openmoko, Inc. 5 - * Author: Balaji Rao <balajirrao@openmoko.org> 6 - * All rights reserved. 7 - * 8 - * Broken down from monstrous PCF50633 driver mainly by 9 - * Harald Welte, Andy Green and Werner Almesberger 10 - */ 11 - 12 - #include <linux/kernel.h> 13 - #include <linux/module.h> 14 - #include <linux/device.h> 15 - #include <linux/platform_device.h> 16 - #include <linux/input.h> 17 - #include <linux/slab.h> 18 - 19 - #include <linux/mfd/pcf50633/core.h> 20 - 21 - #define PCF50633_OOCSTAT_ONKEY 0x01 22 - #define PCF50633_REG_OOCSTAT 0x12 23 - #define PCF50633_REG_OOCMODE 0x10 24 - 25 - struct pcf50633_input { 26 - struct pcf50633 *pcf; 27 - struct input_dev *input_dev; 28 - }; 29 - 30 - static void 31 - pcf50633_input_irq(int irq, void *data) 32 - { 33 - struct pcf50633_input *input; 34 - int onkey_released; 35 - 36 - input = data; 37 - 38 - /* We report only one event depending on the key press status */ 39 - onkey_released = pcf50633_reg_read(input->pcf, PCF50633_REG_OOCSTAT) 40 - & PCF50633_OOCSTAT_ONKEY; 41 - 42 - if (irq == PCF50633_IRQ_ONKEYF && !onkey_released) 43 - input_report_key(input->input_dev, KEY_POWER, 1); 44 - else if (irq == PCF50633_IRQ_ONKEYR && onkey_released) 45 - input_report_key(input->input_dev, KEY_POWER, 0); 46 - 47 - input_sync(input->input_dev); 48 - } 49 - 50 - static int pcf50633_input_probe(struct platform_device *pdev) 51 - { 52 - struct pcf50633_input *input; 53 - struct input_dev *input_dev; 54 - int ret; 55 - 56 - 57 - input = kzalloc(sizeof(*input), GFP_KERNEL); 58 - if (!input) 59 - return -ENOMEM; 60 - 61 - input_dev = input_allocate_device(); 62 - if (!input_dev) { 63 - kfree(input); 64 - return -ENOMEM; 65 - } 66 - 67 - platform_set_drvdata(pdev, input); 68 - input->pcf = dev_to_pcf50633(pdev->dev.parent); 69 - input->input_dev = input_dev; 70 - 71 - input_dev->name = "PCF50633 PMU events"; 72 - input_dev->id.bustype = BUS_I2C; 73 - input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR); 74 - set_bit(KEY_POWER, input_dev->keybit); 75 - 76 - ret = input_register_device(input_dev); 77 - if (ret) { 78 - input_free_device(input_dev); 79 - kfree(input); 80 - return ret; 81 - } 82 - pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYR, 83 - pcf50633_input_irq, input); 84 - pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYF, 85 - pcf50633_input_irq, input); 86 - 87 - return 0; 88 - } 89 - 90 - static void pcf50633_input_remove(struct platform_device *pdev) 91 - { 92 - struct pcf50633_input *input = platform_get_drvdata(pdev); 93 - 94 - pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYR); 95 - pcf50633_free_irq(input->pcf, PCF50633_IRQ_ONKEYF); 96 - 97 - input_unregister_device(input->input_dev); 98 - kfree(input); 99 - } 100 - 101 - static struct platform_driver pcf50633_input_driver = { 102 - .driver = { 103 - .name = "pcf50633-input", 104 - }, 105 - .probe = pcf50633_input_probe, 106 - .remove = pcf50633_input_remove, 107 - }; 108 - module_platform_driver(pcf50633_input_driver); 109 - 110 - MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>"); 111 - MODULE_DESCRIPTION("PCF50633 input driver"); 112 - MODULE_LICENSE("GPL"); 113 - MODULE_ALIAS("platform:pcf50633-input");