Re: [PATCH 5/5] ARM: pxa168: aspenite: add board support for keypad

From: Eric Miao
Date: Fri Sep 03 2010 - 10:40:17 EST


On Fri, Sep 3, 2010 at 10:11 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:
> Dne PÃ 3. zÃÅÃ 2010 06:50:28 Mark F. Brown napsal(a):
>> On Tue, Aug 31, 2010 at 1:00 AM, Haojian Zhuang
>>
>> <haojian.zhuang@xxxxxxxxx> wrote:
>> > On Thu, Aug 26, 2010 at 5:18 PM, Mark F. Brown <mark.brown314@xxxxxxxxx>
> wrote:
>> >> Signed-off-by: Mark F. Brown <mark.brown314@xxxxxxxxx>
>> >> ---
>> >> Âarch/arm/mach-mmp/aspenite.c | Â 27 +++++++++++++++++++++++++++
>> >> Â1 files changed, 27 insertions(+), 0 deletions(-)
>> >>
>> >> diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
>> >> index 9e1bd6b..1b788c5 100644
>> >> --- a/arch/arm/mach-mmp/aspenite.c
>> >> +++ b/arch/arm/mach-mmp/aspenite.c
>> >> @@ -24,6 +24,8 @@
>> >> Â#include <mach/pxa168.h>
>> >> Â#include <mach/gpio.h>
>> >> Â#include <video/pxa168fb.h>
>> >> +#include <linux/input.h>
>> >> +#include <plat/pxa27x_keypad.h>
>> >>
>> >> Â#include "common.h"
>> >>
>> >> @@ -97,6 +99,13 @@ static unsigned long common_pin_config[] __initdata =
>> >> { GPIO81_LCD_DD21,
>> >> Â Â Â ÂGPIO82_LCD_DD22,
>> >> Â Â Â ÂGPIO83_LCD_DD23,
>> >> +
>> >> + Â Â Â /* Keypad */
>> >> + Â Â Â GPIO109_KP_MKIN1,
>> >> + Â Â Â GPIO110_KP_MKIN0,
>> >> + Â Â Â GPIO111_KP_MKOUT7,
>> >> + Â Â Â GPIO112_KP_MKOUT6,
>> >> + Â Â Â GPIO121_KP_MKIN4,
>> >> Â};
>> >>
>> >> Âstatic struct smc91x_platdata smc91x_info = {
>> >> @@ -193,6 +202,23 @@ struct pxa168fb_mach_info aspenite_lcd_info = {
>> >>    Â.invert_pixclock    Â= 0,
>> >> Â};
>> >>
>> >> +static unsigned int aspenite_matrix_key_map[] = {
>> >> + Â Â Â KEY(0, 6, KEY_UP), Â Â Â/* SW 4 */
>> >> + Â Â Â KEY(0, 7, KEY_DOWN), Â Â/* SW 5 */
>> >> + Â Â Â KEY(1, 6, KEY_LEFT), Â Â/* SW 6 */
>> >> + Â Â Â KEY(1, 7, KEY_RIGHT), Â /* SW 7 */
>> >> + Â Â Â KEY(4, 6, KEY_ENTER), Â /* SW 8 */
>> >> + Â Â Â KEY(4, 7, KEY_ESC), Â Â /* SW 9 */
>> >> +};
>> >> +
>> >> +static struct pxa27x_keypad_platform_data aspenite_keypad_info
>> >> __initdata = { +    .matrix_key_rows    Â= 8,
>> >> +    .matrix_key_cols    Â= 8,
>> >
>> > It seems that maxium columns is 5, not 8.
>> >
>> >> +    .matrix_key_map     = aspenite_matrix_key_map,
>> >> +    .matrix_key_map_size  Â= ARRAY_SIZE(aspenite_matrix_key_map),
>> >> +    .debounce_interval   Â= 30,
>> >> +};
>> >> +
>> >> Âstatic void __init common_init(void)
>> >> Â{
>> >> Â Â Â Âmfp_config(ARRAY_AND_SIZE(common_pin_config));
>> >> @@ -203,6 +229,7 @@ static void __init common_init(void)
>> >> Â Â Â Âpxa168_add_ssp(1);
>> >> Â Â Â Âpxa168_add_nand(&aspenite_nand_info);
>> >> Â Â Â Âpxa168_add_fb(&aspenite_lcd_info);
>> >> + Â Â Â pxa168_add_keypad(&aspenite_keypad_info);
>> >>
>> >> Â Â Â Â/* off-chip devices */
>> >> Â Â Â Âplatform_device_register(&smc91x_device);
>> >> --
>> >> 1.7.0.4
>> >>
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
>> >> in the body of a message to majordomo@xxxxxxxxxxxxxxx
>> >> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>> >> Please read the FAQ at Âhttp://www.tux.org/lkml/
>>
>> The maximum keypad columns are 8 and the maximum keypad rows are 5 for
>> Aspenite. I will correct that in my patch resubmission!
>
> Eric, did you merge this already ? If so, we'll need a separate patch here?
>

Nope. Together with Mark's other change to the pxa27x_keypad platform_data
for the wakeup cleanup in IRQ, I'd expect a v2 series of this patchset.

>>
>> Regards,
>> -- Mark
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/