Re: [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver
On Mon, Jun 28, 2010 at 05:39:39PM +0900, Joonyoung Shim wrote: > Hi, Dmitry. > > On 6/25/2010 5:30 PM, Dmitry Torokhov wrote: > > Hi Joonyoung, > > > > On Mon, Jun 21, 2010 at 03:26:45PM +0900, Joonyoung Shim wrote: > >> This patch adds support for keypad driver running on Samsung cpus. This > >> driver is tested on GONI and Aquila board using S5PC110 cpu. > >> > >> Signed-off-by: Joonyoung Shim > >> Signed-off-by: Kyungmin Park > > > > Following my conversation with Thomas Gleixner reagrding "long playing" > > threaded interrupt handlers I tried to convert your driver to use this > > concept. The idea is to keep polling within IRQ thread context instead > > of using additional work/timer structures to simplify code and ensure > > race-free shutdown/unbind. > > > > I think it was based on v4 of your driver and I'd appreciate if you could > > give it a try. > > > > Thank you. > > > > I have tested your patch on my v5 patchset and it is working after some > fixing. I will post v6 patchset appling your patch. Cool, thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver
Hi, Dmitry. On 6/25/2010 5:30 PM, Dmitry Torokhov wrote: > Hi Joonyoung, > > On Mon, Jun 21, 2010 at 03:26:45PM +0900, Joonyoung Shim wrote: >> This patch adds support for keypad driver running on Samsung cpus. This >> driver is tested on GONI and Aquila board using S5PC110 cpu. >> >> Signed-off-by: Joonyoung Shim >> Signed-off-by: Kyungmin Park > > Following my conversation with Thomas Gleixner reagrding "long playing" > threaded interrupt handlers I tried to convert your driver to use this > concept. The idea is to keep polling within IRQ thread context instead > of using additional work/timer structures to simplify code and ensure > race-free shutdown/unbind. > > I think it was based on v4 of your driver and I'd appreciate if you could > give it a try. > > Thank you. > I have tested your patch on my v5 patchset and it is working after some fixing. I will post v6 patchset appling your patch. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver
On 6/25/2010 7:25 PM, Joonyoung Shim wrote: > On 6/25/2010 5:30 PM, Dmitry Torokhov wrote: >> Hi Joonyoung, >> >> On Mon, Jun 21, 2010 at 03:26:45PM +0900, Joonyoung Shim wrote: >>> This patch adds support for keypad driver running on Samsung cpus. This >>> driver is tested on GONI and Aquila board using S5PC110 cpu. >>> >>> Signed-off-by: Joonyoung Shim >>> Signed-off-by: Kyungmin Park >> Following my conversation with Thomas Gleixner reagrding "long playing" >> threaded interrupt handlers I tried to convert your driver to use this >> concept. The idea is to keep polling within IRQ thread context instead >> of using additional work/timer structures to simplify code and ensure >> race-free shutdown/unbind. >> >> I think it was based on v4 of your driver and I'd appreciate if you could >> give it a try. >> > > Your patch gives me below patch errors. > Your patch maybe seems be based on my v3 patch :) > $ patch -p1 --dry-run < 2.patch > (Stripping trailing CRs from patch.) > patching file drivers/input/keyboard/samsung-keypad.c > Hunk #3 FAILED at 68. > Hunk #4 FAILED at 116. > Hunk #5 FAILED at 158. > Hunk #6 succeeded at 196 (offset -7 lines). > Hunk #7 succeeded at 212 (offset -7 lines). > Hunk #8 FAILED at 230. > Hunk #9 FAILED at 365. > Hunk #10 FAILED at 418. > 6 out of 10 hunks FAILED -- saving rejects to file > drivers/input/keyboard/samsung-keypad.c.rej > > Can you give me your patch based on my v5 patches? If not, i should try > manual merge. > > Thanks. > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver
On 6/25/2010 5:30 PM, Dmitry Torokhov wrote: > Hi Joonyoung, > > On Mon, Jun 21, 2010 at 03:26:45PM +0900, Joonyoung Shim wrote: >> This patch adds support for keypad driver running on Samsung cpus. This >> driver is tested on GONI and Aquila board using S5PC110 cpu. >> >> Signed-off-by: Joonyoung Shim >> Signed-off-by: Kyungmin Park > > Following my conversation with Thomas Gleixner reagrding "long playing" > threaded interrupt handlers I tried to convert your driver to use this > concept. The idea is to keep polling within IRQ thread context instead > of using additional work/timer structures to simplify code and ensure > race-free shutdown/unbind. > > I think it was based on v4 of your driver and I'd appreciate if you could > give it a try. > Your patch gives me below patch errors. $ patch -p1 --dry-run < 2.patch (Stripping trailing CRs from patch.) patching file drivers/input/keyboard/samsung-keypad.c Hunk #3 FAILED at 68. Hunk #4 FAILED at 116. Hunk #5 FAILED at 158. Hunk #6 succeeded at 196 (offset -7 lines). Hunk #7 succeeded at 212 (offset -7 lines). Hunk #8 FAILED at 230. Hunk #9 FAILED at 365. Hunk #10 FAILED at 418. 6 out of 10 hunks FAILED -- saving rejects to file drivers/input/keyboard/samsung-keypad.c.rej Can you give me your patch based on my v5 patches? If not, i should try manual merge. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver
Hi Joonyoung, On Mon, Jun 21, 2010 at 03:26:45PM +0900, Joonyoung Shim wrote: > This patch adds support for keypad driver running on Samsung cpus. This > driver is tested on GONI and Aquila board using S5PC110 cpu. > > Signed-off-by: Joonyoung Shim > Signed-off-by: Kyungmin Park Following my conversation with Thomas Gleixner reagrding "long playing" threaded interrupt handlers I tried to convert your driver to use this concept. The idea is to keep polling within IRQ thread context instead of using additional work/timer structures to simplify code and ensure race-free shutdown/unbind. I think it was based on v4 of your driver and I'd appreciate if you could give it a try. Thank you. -- Dmitry Input: samsung-keypad - updates From: Dmitry Torokhov Signed-off-by: Dmitry Torokhov --- arch/arm/plat-samsung/include/plat/keypad.h | 21 - arch/arm/plat-samsung/include/plat/regs-keypad.h | 49 --- drivers/input/keyboard/samsung-keypad.c | 334 ++ 3 files changed, 215 insertions(+), 189 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/regs-keypad.h diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/plat-samsung/include/plat/keypad.h index 04ba600..0a35784 100644 --- a/arch/arm/plat-samsung/include/plat/keypad.h +++ b/arch/arm/plat-samsung/include/plat/keypad.h @@ -34,24 +34,11 @@ */ struct samsung_keypad_platdata { const struct matrix_keymap_data *keymap_data; - unsigned introws; - unsigned intcols; - unsigned intrep:1; + unsigned int rows; + unsigned int cols; + bool rep; - void(*cfg_gpio)(unsigned int rows, unsigned int cols); + void (*cfg_gpio)(unsigned int rows, unsigned int cols); }; -/** - * samsung_keypad_set_platdata - Set platform data for Samsung Keypad device. - * @pd: Platform data to register to device. - * - * Register the given platform data for use with Samsung Keypad device. - * The call will copy the platform data, so the board definitions can - * make the structure itself __initdata. - */ -extern void samsung_keypad_set_platdata(struct samsung_keypad_platdata *pd); - -/* defined by architecture to configure gpio. */ -extern void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols); - #endif /* __PLAT_SAMSUNG_KEYPAD_H */ diff --git a/arch/arm/plat-samsung/include/plat/regs-keypad.h b/arch/arm/plat-samsung/include/plat/regs-keypad.h deleted file mode 100644 index e4688f0..000 --- a/arch/arm/plat-samsung/include/plat/regs-keypad.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * linux/arch/arm/plat-samsung/include/plat/regs-keypad.h - * - * Copyright (C) 2010 Samsung Electronics Co.Ltd - * Author: Joonyoung Shim - * - * 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. - * - */ - -#ifndef __SAMSUNG_KEYPAD_H__ -#define __SAMSUNG_KEYPAD_H__ - -#define SAMSUNG_KEYIFCON 0x00 -#define SAMSUNG_KEYIFSTSCLR0x04 -#define SAMSUNG_KEYIFCOL 0x08 -#define SAMSUNG_KEYIFROW 0x0c -#define SAMSUNG_KEYIFFC0x10 - -/* SAMSUNG_KEYIFCON */ -#define SAMSUNG_KEYIFCON_INT_F_EN (1 << 0) -#define SAMSUNG_KEYIFCON_INT_R_EN (1 << 1) -#define SAMSUNG_KEYIFCON_DF_EN (1 << 2) -#define SAMSUNG_KEYIFCON_FC_EN (1 << 3) -#define SAMSUNG_KEYIFCON_WAKEUPEN (1 << 4) - -/* SAMSUNG_KEYIFSTSCLR */ -#define SAMSUNG_KEYIFSTSCLR_P_INT_MASK (0xff << 0) -#define SAMSUNG_KEYIFSTSCLR_R_INT_MASK (0xff << 8) -#define SAMSUNG_KEYIFSTSCLR_R_INT_OFFSET 8 -#define S5PV210_KEYIFSTSCLR_P_INT_MASK (0x3fff << 0) -#define S5PV210_KEYIFSTSCLR_R_INT_MASK (0x3fff << 16) -#define S5PV210_KEYIFSTSCLR_R_INT_OFFSET 16 - -/* SAMSUNG_KEYIFCOL */ -#define SAMSUNG_KEYIFCOL_MASK (0xff << 0) -#define S5PV210_KEYIFCOLEN_MASK(0xff << 8) - -/* SAMSUNG_KEYIFROW */ -#define SAMSUNG_KEYIFROW_MASK (0xff << 0) -#define S5PV210_KEYIFROW_MASK (0x3fff << 0) - -/* SAMSUNG_KEYIFFC */ -#define SAMSUNG_KEYIFFC_MASK (0x3ff << 0) - -#endif /* __SAMSUNG_KEYPAD_H__ */ diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 244a3b6..c243fc5 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -1,5 +1,5 @@ /* - * samsung-keypad.c -- Samsung keypad driver + * Samsung keypad driver * * Copyright (C) 2010 Samsung Electronics Co.Ltd * Author: Joonyoung Shim @@ -21,8 +21,45 @@ #include #include #include -#include -#include +//#include +#include "/home/dtor/