Re: [PATCH] Input-polldev:Check poll_interval range while registering input device

2015-07-17 Thread Anshul Garg
Hi Mr. Dmitry , On Fri, Jul 17, 2015 at 1:05 AM, Dmitry Torokhov wrote: > Hi Anshul, > > On Thu, Jul 16, 2015 at 10:57:13AM -0700, Anshul Garg wrote: >> Added check for poll_interval range in input_register_polled_device >> function similar to input_polldev_set_poll funct

[PATCH] Input-polldev:Check poll_interval range while registering input device

2015-07-16 Thread Anshul Garg
Added check for poll_interval range in input_register_polled_device function similar to input_polldev_set_poll function. Signed-off-by: Anshul Garg --- drivers/input/input-polldev.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/input-polldev.c b/drivers/input/input

[PATCH] Input-polldev:Check poll_interval range while registering input device

2015-07-14 Thread Anshul Garg
Added check for poll_interval range in input_register_polled_device function similar to input_polldev_set_poll function. Signed-off-by: Anshul Garg --- drivers/input/input-polldev.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/input-polldev.c b/drivers/input/input

Re: [PATCH] Input: Use for_each_set_bit where appropriate

2015-07-09 Thread Anshul Garg
Jul 09, 2015 at 11:05:57PM +0530, Anshul Garg wrote: >> Hello Mr. Dmitry , >> >> >> >> On Thu, Jul 9, 2015 at 10:56 PM, Dmitry Torokhov >> wrote: >> > On Thu, Jul 09, 2015 at 06:41:01AM -0700, Anshul Garg wrote: >> >> Use for_each_set_bit to

Re: [PATCH] Input: Use for_each_set_bit where appropriate

2015-07-09 Thread Anshul Garg
Hello Mr. Dmitry , On Thu, Jul 9, 2015 at 10:56 PM, Dmitry Torokhov wrote: > On Thu, Jul 09, 2015 at 06:41:01AM -0700, Anshul Garg wrote: >> Use for_each_set_bit to check for set bits in bitmap >> as it is more efficient and compact. >> Also use bitwise and instead of exp

[PATCH] Input: Use for_each_set_bit where appropriate

2015-07-09 Thread Anshul Garg
Use for_each_set_bit to check for set bits in bitmap as it is more efficient and compact. Also use bitwise and instead of expensive % operation while fetching next event. Signed-off-by: Anshul Garg --- drivers/input/misc/uinput.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions

[PATCH] Input: Use for_each_set_bit where appropriate

2015-07-08 Thread Anshul Garg
Use for_each_set_bit to check for set bits in bitmap as it is more efficient than checking individual bits. Signed-off-by: Anshul Garg --- drivers/input/ff-core.c |5 ++--- drivers/input/joydev.c | 11 +-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers

Re: [PATCH] Input/evdev: Add 64bit timestamp support

2015-07-07 Thread Anshul Garg
Hello Mr. Dmitry , Thanks for the replies. Yes you are right there is not enough backup for addition of this feature. So we can skip it as of now. Thanks On Tue, Jul 7, 2015 at 11:44 PM, Dmitry Torokhov wrote: > Hi Anshul, > > On Tue, Jul 07, 2015 at 07:30:23PM +0530, Anshul G

Re: [PATCH] Input/evdev: Add 64bit timestamp support

2015-07-07 Thread Anshul Garg
Hello Mr. Dmitry , On Tue, Jul 7, 2015 at 4:18 AM, Dmitry Torokhov wrote: > Hi Anshul, > > On Mon, Jul 06, 2015 at 12:33:44PM -0700, Anshul Garg wrote: >> From: Anshul Garg >> >> As per current implementation input driver can only >> send ktime converted

[PATCH] Input/evdev: Add 64bit timestamp support

2015-07-06 Thread Anshul Garg
From: Anshul Garg As per current implementation input driver can only send ktime converted to timeval which user space again have to convert. In some cases input drivers need 64bit timestamp value from driver only so that same value can be used by upper layer without any manipulation. Proposed

[PATCH v2] Input :Optimize input_dev_release_keys function

2015-06-25 Thread Anshul Garg
From: Anshul Garg input_dev_release_keys : Use for_each_set_bit instead of testing every bit upto KEY_MAX as it is more clean and more optimized. input_estimate_events_per_packet : Use bitmap_weight to get set bits count for EV_REL type instead of using loop and also use for_each_set_bit for

Re: [PATCH] Input :Optimize input_dev_release_keys function

2015-06-23 Thread Anshul Garg
Hello Mr. Dmitry, Yes it was actually a typo. I have tested the code with resetting "key" structure instead of "keybit". I have resent the patch for the review. Please check. On Wed, Jun 24, 2015 at 12:27 AM, Dmitry Torokhov wrote: > On Tue, Jun 23, 2015 at 11:08:

[PATCH] Input :Optimize input_dev_release_keys function

2015-06-23 Thread Anshul Garg
From: Anshul Garg input_dev_release_keys : Use for_each_set_bit instead of testing every bit upto KEY_MAX as it is more clean and more optimized. input_estimate_events_per_packet : Use bitmap_weight to get set bits count for EV_REL type instead of using loop and also use for_each_set_bit for

[PATCH] Input :Optimize input_dev_release_keys function

2015-06-23 Thread Anshul Garg
From: Anshul Garg input_dev_release_keys : Use for_each_set_bit instead of testing every bit upto KEY_MAX as it is more clean and more optimized. input_estimate_events_per_packet : Use bitmap_weight to get set bits count for EV_REL type instead of using loop and also use for_each_set_bit for

Re: [PATCH] Input :Added Check for EV_ABS event params

2015-04-22 Thread Anshul Garg
Hello Mr. Dmitry , On Tue, Apr 21, 2015 at 11:59 PM, Dmitry Torokhov wrote: > Hi Anshul, > > On Tue, Apr 21, 2015 at 11:19:52AM -0700, Anshul Garg wrote: >> From: Anshul Garg >> >> while handling EV_ABS event in input_handle_abs_event >> function added check

[PATCH] Input :Added Check for EV_ABS event params

2015-04-21 Thread Anshul Garg
From: Anshul Garg while handling EV_ABS event in input_handle_abs_event function added check for out of range event value from input driver. As input driver sets the ABS params at registration time so input core should ignore events out of the range set by the input driver. Signed-off-by

[PATCH] Input : Optimize joydev_connect function

2015-03-10 Thread Anshul Garg
From: Anshul Garg In joydev_connect function added check for event type before setting properties for that event. This will avoid dummy loop iterations which checks for event code even if event type is not set. Signed-off-by: Anshul Garg --- drivers/input/joydev.c | 44

[PATCH] lib/kstrtox.c break if overflow is detected

2015-01-21 Thread Anshul Garg
From: Anshul Garg 1. While converting string representation to integer break the loop if overflow is detected. 2. Clean kstrtoll function Signed-off-by: Anshul Garg --- lib/kstrtox.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib

[RESEND PATCH] Input:Evdev Flush pending events on clk change

2015-01-15 Thread Anshul Garg
From: Anshul Garg If client clk_type is changed , flush pending events from client buffer as events time would be incorrect and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c | 56

Re: [PATCH] Input:Evdev Flush pending events on clk change

2015-01-11 Thread Anshul Garg
pe to hear from you soon. Thanks Anshul Garg +91-9899777351 On Mon, Jan 12, 2015 at 12:03 AM, Dmitry Torokhov wrote: > Hi Anshul, > > On Sun, Jan 11, 2015 at 07:54:52AM -0800, Anshul Garg wrote: >> From: Anshul Garg >> >> If client clk_type is changed , flush pending e

[PATCH] Input:Evdev Flush pending events on clk change

2015-01-11 Thread Anshul Garg
From: Anshul Garg If client clk_type is changed , flush pending events from client buffer as events time would be incorrect and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c | 56

[PATCH] Input:Evdev Flush pending events on clk change

2015-01-09 Thread Anshul Garg
From: Anshul Garg If client clk_type is changed , flush pending events from client buffer as events time would be incorrect and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c | 56

Re: [PATCH] Input:Flush client events on clk_type change

2015-01-08 Thread Anshul Garg
e can extend__evdev_flush_queue function to support flushing of client event queue. As currently this function flushes single type of events only. I think 2nd way is better. Please give your insignt on above suggested changes. Thanks Anshul Garg -- To unsubscribe from this list: send the line &qu

[PATCH] Input: Optimize Event Filter functionality

2015-01-08 Thread Anshul Garg
From: Anshul Garg As input_pass_values function is called everytime when EV_SYN is sent from input driver or input event buffer becomes full. So in case of regular handler event filter code should not run so added check whether handler supports filter or not. Signed-off-by: Anshul Garg

[PATCH] Input: Optimize Auto Repeat Loop

2015-01-08 Thread Anshul Garg
From: Anshul Garg As input_pass_values function is called everytime when EV_SYN is sent from input driver or input event buffer becomes full. So avoid running auto repeat code if input device doesn't support EV_KEY and EV_REP event type. Signed-off-by: Anshul Garg --- drivers/input/in

[PATCH] Input:Flush client events on clk_type change

2015-01-07 Thread Anshul Garg
From: Anshul Garg Since the client clk_type is changed , flush pending events from client buffer and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c | 58 ++--- 1

[PATCH] Input:Flush client events on clk_type change

2015-01-07 Thread Anshul Garg
From: Anshul Garg Since the client clk_type is changed , flush pending events from client buffer and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c | 18 -- 1 file changed, 16 insertions(+), 2

[PATCH] Input:Flush client events after clk_type change

2015-01-06 Thread Anshul Garg
From: Anshul Garg Since the client clk_type is changed , flush pending events from client buffer and queue SYN_DROPPED event. Added check for duplicate clk_type change request. Signed-off-by: Anshul Garg --- drivers/input/evdev.c |9 - 1 file changed, 8 insertions(+), 1 deletion

[PATCH] Input: Optimize Event Filter functionality

2015-01-05 Thread Anshul Garg
From: Anshul Garg As input_pass_values function is called everytime when EV_SYN is sent from input driver or input event buffer becomes full. So in case of regular handler event filter code should not run so added check whether handler supports filter or not. Signed-off-by: Anshul Garg

[PATCH] Input: Optimize Auto Repeat Loop

2015-01-05 Thread Anshul Garg
From: Anshul Garg As input_pass_values function is called everytime when EV_SYN is sent from input driver or input event buffer becomes full. So avoid running auto repeat code if input device doesn't support EV_KEY and EV_REP event type. Signed-off-by: Anshul Garg --- drivers/input/in

Re: [PATCH] Input: Optimize input_to_handler and input_pass_values function

2015-01-05 Thread Anshul Garg
Dear Mr Dimtry , Thanks for the suggestions. I will send you the updated patch soon. On Mon, Jan 5, 2015 at 4:27 AM, Dmitry Torokhov wrote: > On Tue, Dec 30, 2014 at 11:19:53AM +0530, anshu...@samsung.com wrote: >> From: Anshul Garg >> >> As input_pass_values functio

[PATCH] Input: Added check for grabbed device

2015-01-04 Thread Anshul Garg
From: Anshul Garg If input device is grabbed then client which has grabbed the device can flush or write to the device so for other clients -EINVAL should be returned. Signed-off-by: Anshul Garg --- drivers/input/evdev.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers

Re: [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-29 Thread Anshul Garg
Dear Mr. Dmitry , Thanks a lot for clearing my doubts :) On Sat, Dec 27, 2014 at 5:16 AM, Dmitry Torokhov wrote: > Hi Anshul, > > On Thu, Dec 25, 2014 at 11:11:06AM +0530, Anshul Garg wrote: >> Dear Mr Dmitry , >> >> Thanks a lot for the clarification. >>

Re: [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-24 Thread Anshul Garg
e really need to have support of such handlers in input core then only my patch is good. Hope to hear from you soon :) Thanks Anshul Garg On Wed, Dec 24, 2014 at 11:55 PM, Dmitry Torokhov wrote: > Hi Anshul, > > On Tue, Dec 23, 2014 at 08:04:45PM +0530, Anshul Garg wrote: >> Dear M

Re: [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-23 Thread Anshul Garg
from you soon. Thanks On Mon, Dec 22, 2014 at 10:56 PM, Dmitry Torokhov wrote: > Hi Anshul, > > On Mon, Dec 22, 2014 at 10:36:09PM +0530, Anshul Garg wrote: >> In function input_pass_values in input.c file , input core sends all >> events to each handler associated

Re: [Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-22 Thread Anshul Garg
you soon. Thanks On Mon, Dec 22, 2014 at 10:56 PM, Dmitry Torokhov wrote: > Hi Anshul, > > On Mon, Dec 22, 2014 at 10:36:09PM +0530, Anshul Garg wrote: >> In function input_pass_values in input.c file , input core sends all >> events to each handler associated

[Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-22 Thread Anshul Garg
Dear Mr. Dmitry and Linux Community, I am Anshul Garg working on Linux Kernel from last 2 years . I have one query regarding event filter mechanism in input subsystem. Can you please help in answering my query as below: == === In function

[Question : drivers/input ] Fixing Event Filter Mechanism in input subsystem

2014-12-22 Thread Anshul Garg
Dear Mr. Dmitry and Linux Community, I am Anshul Garg working on Linux Kernel from last 2 years . I have one query regarding event filter mechanism in input subsystem. Can you please help in answering my query as below: = In function