Re: [PATCH] input: add support for generic GPIO-based matrix keypad
From: Marek Vasut <marek.vasut@gmail.com>
Date: 2009-07-04 05:54:31
Dne St 10. června 2009 06:10:31 Trilok Soni napsal(a):
Hi Dmitry,quoted
Sounds good, patch updated again, with attachment.quoted
From 76776dfc468dc35f0d8394a2331e1a91f390e642 Mon Sep 17 00:00:00 2001From: Marek Vasut <marek.vasut@gmail.com> Date: Thu, 7 May 2009 15:49:32 +0800 Subject: [PATCH] input: add support for generic GPIO-based matrix keypadCould you please review this patch and see if it can be acked as merge window will open in couple of days? Thanks.
Hi, I have but one comment (see further), otherwise works well on Palm Tungsten C (PXA255A0 CPU). btw Eric, please add yourself to the credits, you did most of the work on it anyway ;-) .
quoted
Original patch by Marek Vasut, modified by Eric in: 1. use delayed work to simplify the debouncing process
...
quoted
diff --git a/include/linux/input/matrix_keypad.hb/include/linux/input/matrix_keypad.h new file mode 100644 index 0000000..8b661cb--- /dev/null +++ b/include/linux/input/matrix_keypad.h@@ -0,0 +1,34 @@ +#ifndef _MATRIX_KEYPAD_H +#define _MATRIX_KEYPAD_H + +#include <linux/input.h> + +#define MATRIX_MAX_ROWS 16 +#define MATRIX_MAX_COLS 16 +#define MATRIX_MAX_KEYS (MATRIX_MAX_ROWS *MATRIX_MAX_COLS) + +struct matrix_keypad_platform_data { + /* scancode map for the matrix keys */ + uint32_t *key_map; + int key_map_size; + + unsigned row_gpios[MATRIX_MAX_ROWS]; + unsigned col_gpios[MATRIX_MAX_COLS];
Why not doing the above like the following? + unsigned *row_gpios; + unsigned *col_gpios;
quoted
+ int num_row_gpios; + int num_col_gpios; + + unsigned int active_low;
-- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html