<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/input/evdev.c, branch T20_LinuxImageV2.0_20130305</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Input: evdev - Add ioctl to block suspend while event queue is not empty.</title>
<updated>2012-02-03T13:55:30+00:00</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2008-10-17T22:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6bc5e3cc4858726819db7af65a6991c52c41f31c'/>
<id>6bc5e3cc4858726819db7af65a6991c52c41f31c</id>
<content type='text'>
Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.

The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.

(cherry picked from commit 4dc43d7079bdae572212368e1d29abea0177c932 from
android.googlesource.com/common.git)

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Change-Id: I160d2afe77aa76c9d2bbe01cd4b81434201361a9
Reviewed-on: http://git-master/r/78895
Reviewed-by: Automatic_Commit_Validation_User
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.

The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.

(cherry picked from commit 4dc43d7079bdae572212368e1d29abea0177c932 from
android.googlesource.com/common.git)

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Change-Id: I160d2afe77aa76c9d2bbe01cd4b81434201361a9
Reviewed-on: http://git-master/r/78895
Reviewed-by: Automatic_Commit_Validation_User
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - Don't hold wakelock when no data is available to user-space</title>
<updated>2012-02-03T13:55:18+00:00</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2012-01-24T01:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41b21130fd7c9ad2b241b3e6174f0c8e4ea111b7'/>
<id>41b21130fd7c9ad2b241b3e6174f0c8e4ea111b7</id>
<content type='text'>
If there is no SYN_REPORT event in the buffer the buffer data is invisible
to user-space. The wakelock should not be held in this case.

(cherry picked from commit 7cc846069a8a9116d8c81526c459070eed0e3477 from
android.googlesource.com/common.git)

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Change-Id: I7555b190ff8e4e526291dd353c3c0291b05dfff2
Reviewed-on: http://git-master/r/78894
Reviewed-by: Automatic_Commit_Validation_User
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there is no SYN_REPORT event in the buffer the buffer data is invisible
to user-space. The wakelock should not be held in this case.

(cherry picked from commit 7cc846069a8a9116d8c81526c459070eed0e3477 from
android.googlesource.com/common.git)

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Change-Id: I7555b190ff8e4e526291dd353c3c0291b05dfff2
Reviewed-on: http://git-master/r/78894
Reviewed-by: Automatic_Commit_Validation_User
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: Initialize retval to zero</title>
<updated>2012-01-13T21:42:48+00:00</updated>
<author>
<name>Preetham Chandru</name>
<email>pchandru@nvidia.com</email>
</author>
<published>2012-01-12T06:17:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76127876b09a54f9fee7290e23d36754b398ecee'/>
<id>76127876b09a54f9fee7290e23d36754b398ecee</id>
<content type='text'>
In evdev_read() the local variable retval is not initialized.
If this variable is not initialized then in case of NONBLOCK READ
retval will have invalid value.

Bug: 922453
Change-Id: I534cbfacf8a0514fcb5bc481a98d0e94a4d73b04
Signed-off-by: Preetham Chandru R &lt;pchandru@nvidia.com&gt;
Reviewed-on: http://git-master/r/74898
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Reviewed-by: Sanjay Singh Rawat &lt;srawat@nvidia.com&gt;
Tested-by: Sanjay Singh Rawat &lt;srawat@nvidia.com&gt;
Reviewed-by: Shashank Sharma &lt;shashanks@nvidia.com&gt;
Reviewed-by: Yogish Kulkarni &lt;yogishk@nvidia.com&gt;
Reviewed-by: Kiran Adduri &lt;kadduri@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In evdev_read() the local variable retval is not initialized.
If this variable is not initialized then in case of NONBLOCK READ
retval will have invalid value.

Bug: 922453
Change-Id: I534cbfacf8a0514fcb5bc481a98d0e94a4d73b04
Signed-off-by: Preetham Chandru R &lt;pchandru@nvidia.com&gt;
Reviewed-on: http://git-master/r/74898
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar &lt;vwadekar@nvidia.com&gt;
Reviewed-by: Sanjay Singh Rawat &lt;srawat@nvidia.com&gt;
Tested-by: Sanjay Singh Rawat &lt;srawat@nvidia.com&gt;
Reviewed-by: Shashank Sharma &lt;shashanks@nvidia.com&gt;
Reviewed-by: Yogish Kulkarni &lt;yogishk@nvidia.com&gt;
Reviewed-by: Kiran Adduri &lt;kadduri@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: do not block waiting for an event if fd is nonblock</title>
<updated>2011-12-01T05:39:10+00:00</updated>
<author>
<name>Dima Zavin</name>
<email>dima@android.com</email>
</author>
<published>2011-10-05T00:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=64eb4613f8242745822af408578e784abf64ecc7'/>
<id>64eb4613f8242745822af408578e784abf64ecc7</id>
<content type='text'>
If there is a full packet in the buffer, and we overflow that buffer
right after checking for that condition, it would have been possible
for us to block indefinitely (rather, until the next full packet) even if
the file was marked as O_NONBLOCK.

Change-Id: Icd0f59f8cc98392be4c4d13bd45b5cf94317eb5a
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there is a full packet in the buffer, and we overflow that buffer
right after checking for that condition, it would have been possible
for us to block indefinitely (rather, until the next full packet) even if
the file was marked as O_NONBLOCK.

Change-Id: Icd0f59f8cc98392be4c4d13bd45b5cf94317eb5a
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: if no events and non-block, return EAGAIN not 0</title>
<updated>2011-12-01T05:39:09+00:00</updated>
<author>
<name>Dima Zavin</name>
<email>dima@android.com</email>
</author>
<published>2011-10-05T05:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc458f5194860f69b961deb0380e65b5006a2138'/>
<id>fc458f5194860f69b961deb0380e65b5006a2138</id>
<content type='text'>
Change-Id: I5f0da721f74e5de111cffc7e7b375b72dd80e530
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I5f0da721f74e5de111cffc7e7b375b72dd80e530
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: only allow reading events if a full packet is present</title>
<updated>2011-12-01T05:39:09+00:00</updated>
<author>
<name>Dima Zavin</name>
<email>dima@android.com</email>
</author>
<published>2011-10-04T23:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=702e787706791a2edac206f30996bd5c32302e85'/>
<id>702e787706791a2edac206f30996bd5c32302e85</id>
<content type='text'>
Without this, it was possible for the reader to get ahead of packet_head.
If the the input device generated a partial packet *right* after the
reader got ahead, then we can get into a situation where the device is
marked readable but read always returns 0 until the next packet is
finished (i.e a SYN is generated by the input driver).

This situation can also happen if we overflow the buffer while a reader
is trying to read an event out.

Change-Id: If01ab371bc7de1bf1f90c122dcc5a29242b01a09
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this, it was possible for the reader to get ahead of packet_head.
If the the input device generated a partial packet *right* after the
reader got ahead, then we can get into a situation where the device is
marked readable but read always returns 0 until the next packet is
finished (i.e a SYN is generated by the input driver).

This situation can also happen if we overflow the buffer while a reader
is trying to read an event out.

Change-Id: If01ab371bc7de1bf1f90c122dcc5a29242b01a09
Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: Add missing wake_lock_destroy</title>
<updated>2011-12-01T05:38:27+00:00</updated>
<author>
<name>Benoit Goby</name>
<email>benoit@android.com</email>
</author>
<published>2011-01-19T22:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba820bc8418205e524b74093dcb6fdfa81772325'/>
<id>ba820bc8418205e524b74093dcb6fdfa81772325</id>
<content type='text'>
Change-Id: Ief1ef44d98a197e5b457f5e8617c413e76e3c6d2
Signed-off-by: Benoit Goby &lt;benoit@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ief1ef44d98a197e5b457f5e8617c413e76e3c6d2
Signed-off-by: Benoit Goby &lt;benoit@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>input: evdev: Use unique wakelock names</title>
<updated>2011-12-01T05:37:54+00:00</updated>
<author>
<name>Mike Chan</name>
<email>mike@android.com</email>
</author>
<published>2009-10-28T00:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f96822be4ede139dbe65bf396e59e36874aab43'/>
<id>9f96822be4ede139dbe65bf396e59e36874aab43</id>
<content type='text'>
wakelock names are now contain evdev-&gt;name and pid

Signed-off-by: Mike Chan &lt;mike@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
wakelock names are now contain evdev-&gt;name and pid

Signed-off-by: Mike Chan &lt;mike@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: Use monotonic time for event time stamps.</title>
<updated>2011-12-01T05:37:54+00:00</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2008-10-17T22:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9441b345f6b846b7315f7da3e7c1242eced0bacf'/>
<id>9441b345f6b846b7315f7da3e7c1242eced0bacf</id>
<content type='text'>
Since wall time can jump backwards, it cannot be used to determine if one
event occured before another or for how long a key was pressed.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since wall time can jump backwards, it cannot be used to determine if one
event occured before another or for how long a key was pressed.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: Hold wake lock while event queue is not empty.</title>
<updated>2011-12-01T05:37:54+00:00</updated>
<author>
<name>Arve Hjønnevåg</name>
<email>arve@android.com</email>
</author>
<published>2008-10-17T22:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef6f5b48172ade3ffabe1e8eef753f9f5a13f4c5'/>
<id>ef6f5b48172ade3ffabe1e8eef753f9f5a13f4c5</id>
<content type='text'>
Allows userspace code to process input events while
the device appears to be asleep.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows userspace code to process input events while
the device appears to be asleep.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
