summaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
authorTrilok Soni <tsoni@codeaurora.org>2011-05-19 10:54:04 +0530
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 19:45:53 +0200
commit39325b59d88b42ba2ccf2e62c234059e9941a47c (patch)
treec30b276c1a7dcd1546ef5051721647c43e9abc92 /include/linux/input
parent7e6502d577106fb5b202bbaac64c5f1b065e6daa (diff)
downloadlinux-stable-39325b59d88b42ba2ccf2e62c234059e9941a47c.tar.gz
linux-stable-39325b59d88b42ba2ccf2e62c234059e9941a47c.tar.bz2
linux-stable-39325b59d88b42ba2ccf2e62c234059e9941a47c.zip
input: Add Qualcomm pm8xxx keypad controller driver
Add Qualcomm PMIC8XXX based keypad controller driver supporting upto 18x8 matrix configuration. Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Trilok Soni <tsoni@codeaurora.org> Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/pmic8xxx-keypad.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/linux/input/pmic8xxx-keypad.h b/include/linux/input/pmic8xxx-keypad.h
new file mode 100644
index 000000000000..5f1e2f9ad959
--- /dev/null
+++ b/include/linux/input/pmic8xxx-keypad.h
@@ -0,0 +1,52 @@
+/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+#ifndef __PMIC8XXX_KEYPAD_H__
+#define __PMIC8XXX_KEYPAD_H__
+
+#include <linux/input/matrix_keypad.h>
+
+#define PM8XXX_KEYPAD_DEV_NAME "pm8xxx-keypad"
+
+/**
+ * struct pm8xxx_keypad_platform_data - platform data for keypad
+ * @keymap_data - matrix keymap data
+ * @input_name - input device name
+ * @input_phys_device - input device name
+ * @num_cols - number of columns of keypad
+ * @num_rows - number of row of keypad
+ * @debounce_ms - debounce period in milliseconds
+ * @scan_delay_ms - scan delay in milliseconds
+ * @row_hold_ns - row hold period in nanoseconds
+ * @wakeup - configure keypad as wakeup
+ * @rep - enable or disable key repeat bit
+ */
+struct pm8xxx_keypad_platform_data {
+ const struct matrix_keymap_data *keymap_data;
+
+ const char *input_name;
+ const char *input_phys_device;
+
+ unsigned int num_cols;
+ unsigned int num_rows;
+ unsigned int rows_gpio_start;
+ unsigned int cols_gpio_start;
+
+ unsigned int debounce_ms;
+ unsigned int scan_delay_ms;
+ unsigned int row_hold_ns;
+
+ bool wakeup;
+ bool rep;
+};
+
+#endif /*__PMIC8XXX_KEYPAD_H__ */