aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
committerAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
commit4a922dc8ab2915b61ff6adfe8e0a01069893b52b (patch)
tree6909728173fc18e8a88eaa9aa46eaebffbcabd93 /drivers/input
parenta7e6827348e9e85466c9ab6488769bf862e9fd0b (diff)
MERGE-via-balaji-tracking-balaji-updates
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/input/misc/pcf50633-input.c33
2 files changed, 27 insertions, 8 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index ffff16dce95..cdf0bfcebc7 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -232,5 +232,7 @@ config INPUT_LIS302DL
config INPUT_PCF50633_PMU
tristate "PCF50633 PMU events"
depends on MFD_PCF50633
+ help
+ Say Y to include support for input events on NXP PCF50633.
endif
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c
index 43451dfa8f0..6fafd2729cb 100644
--- a/drivers/input/misc/pcf50633-input.c
+++ b/drivers/input/misc/pcf50633-input.c
@@ -1,3 +1,28 @@
+/* Philips 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 and Andy Green
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
#include <linux/input.h>
#include <linux/mfd/pcf50633/core.h>
@@ -9,7 +34,6 @@ pcf50633_input_irq(struct pcf50633 *pcf, int irq, void *data)
struct input_dev *input_dev = pcf->input.input_dev;
int onkey_released;
-
/* We report only one event depending on if the key status */
onkey_released = pcf50633_reg_read(pcf, PCF50633_REG_OOCSTAT) &
PCF50633_OOCSTAT_ONKEY;
@@ -19,12 +43,6 @@ pcf50633_input_irq(struct pcf50633 *pcf, int irq, void *data)
else if (irq == PCF50633_IRQ_ONKEYR && onkey_released)
input_report_key(input_dev, KEY_POWER, 0);
- /* MBC makes sure that only one of USBINS/USBREM will be called */
- if (irq == PCF50633_IRQ_USBINS)
- input_report_key(input_dev, KEY_POWER2, 1);
- else if (irq == PCF50633_IRQ_USBREM)
- input_report_key(input_dev, KEY_POWER2, 0);
-
input_sync(input_dev);
}
@@ -41,7 +59,6 @@ int __init pcf50633_input_probe(struct platform_device *pdev)
return -ENODEV;
input_dev->name = "GTA02 PMU events";
- input_dev->phys = "FIXME";
input_dev->id.bustype = BUS_I2C;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR);