Re: [PATCH v3 3/3] Input: omap-keypad: Clear interrupts on open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jul 24, 2013 at 06:54:53PM +0300, Illia Smyrnov wrote:
> Clear interrupts when open keypad.
> 
> According to TRM, the recommended way for keyboard controller
> initialization is clear the interrupt-status register, then set up
> certain keyboard events for generating an interrupt request and
> set up expected source of wake-up event that generates a wake-up
> request.
> 
> Signed-off-by: Illia Smyrnov <illia.smyrnov@xxxxxx>
> ---
>  drivers/input/keyboard/omap4-keypad.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index b876a0d..0244262 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -185,8 +185,9 @@ static int omap4_keypad_open(struct input_dev *input)
>  			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
>  	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
>  			OMAP4_VAL_DEBOUNCINGTIME);
> +	/* clear pending interrupts */
>  	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> -			OMAP4_VAL_IRQDISABLE);
> +			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
>  	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>  			OMAP4_DEF_IRQENABLE_EVENTEN |
>  				OMAP4_DEF_IRQENABLE_LONGKEY);

Reviewed-by: Felipe Balbi <balbi@xxxxxx>

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux