|
From: <bob...@us...> - 2006-10-01 09:04:59
|
Revision: 608
http://svn.sourceforge.net/hackndev/?rev=608&view=rev
Author: bobofdoom
Date: 2006-10-01 02:04:38 -0700 (Sun, 01 Oct 2006)
Log Message:
-----------
all: removing pxa27x keypad driver in favour of the keyboard driver accepted upstream.
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/input/keyboard/Kconfig
linux4palm/linux/trunk/drivers/input/keyboard/Makefile
Removed Paths:
-------------
linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keypad.c
Modified: linux4palm/linux/trunk/drivers/input/keyboard/Kconfig
===================================================================
--- linux4palm/linux/trunk/drivers/input/keyboard/Kconfig 2006-10-01 04:59:15 UTC (rev 607)
+++ linux4palm/linux/trunk/drivers/input/keyboard/Kconfig 2006-10-01 09:04:38 UTC (rev 608)
@@ -213,10 +213,4 @@
This enables basic support for the 5-row Palm Universal Wireless
Keyboard.
-config KEYBOARD_PXA27X
- tristate "Intel PXA27x keypad"
- help
- This enables support for the matrix keypad controller of the Intel
- XScale PXA27x CPU.
-
endif
Modified: linux4palm/linux/trunk/drivers/input/keyboard/Makefile
===================================================================
--- linux4palm/linux/trunk/drivers/input/keyboard/Makefile 2006-10-01 04:59:15 UTC (rev 607)
+++ linux4palm/linux/trunk/drivers/input/keyboard/Makefile 2006-10-01 09:04:38 UTC (rev 608)
@@ -18,5 +18,4 @@
obj-$(CONFIG_KEYBOARD_H2200) += h2200_kbd.o
obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o
obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
-# obj-$(CONFIG_KEYBOARD_PXA27X) += pxa27x_keypad.o
obj-$(CONFIG_KEYBOARD_PALMIR) += palmirkbd.o
Deleted: linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keypad.c
===================================================================
--- linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keypad.c 2006-10-01 04:59:15 UTC (rev 607)
+++ linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keypad.c 2006-10-01 09:04:38 UTC (rev 608)
@@ -1,146 +0,0 @@
-/*
- * linux/drivers/input/keyboard/pxa27x_keypad.c
- *
- * Driver for the PXA27x keypad controller. Currently this only supports the
- * matrix keypad interface, not the direct keypad interface.
- *
- * Author: Alex Osborne <bob...@gm...>
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/input.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-#include <asm/arch/hardware.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/irqs.h>
-#include <asm/arch/pxa27x-keypad.h>
-
-static void pxa27x_keypad_report_event(struct pxa27x_keypad_platform_data *kp,
- int row, int col, int pressed)
-{
- if (row >= kp->rows || col >= kp->cols) {
- printk(KERN_ERR "pxa27x_keypad_report_event: out of bounds "
- "key event row=%d col=%d pressed=%d\n", row, col,
- pressed);
- return;
- }
-
- if (kp->matrix[row*kp->cols + col] >= 0) {
- input_report_key(kp->input, kp->matrix[row*kp->cols + col],
- pressed);
- }
-}
-
-static irqreturn_t pxa27x_keypad_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
-{
- struct pxa27x_keypad_platform_data *kp = dev_id;
- int mi, row, col;
-
- /*
- * notify controller that interrupt was handled.
- */
- mi = KPC & KPC_MI;
-
- /* report the status of every button */
- for (row=0; row < kp->rows; row++) {
- for (col=0; col < kp->cols; col++) {
- pxa27x_keypad_report_event(kp, row, col, KPASMKP(col) &
- KPASMKPx_MKC(row, col));
- }
- }
-
- return IRQ_HANDLED;
-}
-
-static int __init pxa27x_keypad_probe(struct device *dev)
-{
- struct pxa27x_keypad_platform_data *kp;
- struct platform_device *pdev;
- int err, i;
-
- pdev = to_platform_device(dev);
-
- kp = dev->platform_data;
-
- kp->input = input_allocate_device();
- kp->input->evbit[0] = BIT(EV_KEY);
-
- /* register buttons */
- for(i=0; i < kp->rows * kp->cols; i++) {
- if( kp->matrix[i] >= 0 ) {
- kp->input->keybit[LONG(kp->matrix[i])] |= BIT(kp->matrix[i]);
- }
- }
-
- kp->input->name = "PXA27x Keypad";
- kp->input->id.bustype = BUS_HOST;
- input_register_device(kp->input);
-
- /*
- * setup the PXA270 keypad controller for automatic on-activity scanning
- */
- KPC |= kp->rows << 26;
- KPC |= kp->cols << 23;
-
- KPC |= KPC_ASACT; /* enable automatic scan on activity */
- KPC &= ~KPC_AS; /* disable automatic scan */
- KPC &= ~KPC_IMKP; /* do not ignore multiple keypresses */
-
- KPC &= ~KPC_DE; /* disable direct keypad */
- KPC &= ~KPC_DIE; /* disable direct keypad interrupt */
-
- err = request_irq(IRQ_KEYPAD, pxa27x_keypad_irq_handler, SA_INTERRUPT,
- "pxa27x_keypad", kp);
- if(err) {
- printk(KERN_ERR "pxa27x_keypad_probe: cannot request keypad IRQ\n");
- return -1;
- }
-
- KPC |= KPC_ME; /* matrix keypad enabled */
- KPC |= KPC_MIE; /* matrix keypad interrupt enabled */
-
- return 0;
-}
-
-static int pxa27x_keypad_remove (struct device *dev)
-{
- struct pxa27x_keypad_platform_data *kp = dev->platform_data;
-
- free_irq(IRQ_KEYPAD, NULL);
- input_unregister_device(kp->input);
-
- return 0;
-}
-
-static struct device_driver pxa27x_keypad_driver = {
- .name = "pxa27x-keypad",
- .bus = &platform_bus_type,
- .probe = pxa27x_keypad_probe,
- .remove = pxa27x_keypad_remove,
-};
-
-static int __init pxa27x_keypad_init(void)
-{
- return driver_register(&pxa27x_keypad_driver);
-}
-
-static void __exit pxa27x_keypad_exit(void)
-{
- driver_unregister(&pxa27x_keypad_driver);
-}
-
-module_init(pxa27x_keypad_init);
-module_exit(pxa27x_keypad_exit);
-
-MODULE_AUTHOR ("Alex Osborne <bob...@gm...>");
-MODULE_DESCRIPTION ("Matrix keypad support for the PXA27x");
-MODULE_LICENSE ("GPL");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|