p1: drivers: input: update gpio keys driver

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ieb3c4e55eed3f5c333c0cbf12bf240e976fa1c89
p1: drivers: input: bring back stock sensors setup

this reverts:

    e0b260e38308adc688535fce77d37dda2adbaac2
    023413dd484ecbcae614d47f3f43c128837b3466
    e0b260e38308adc688535fce77d37dda2adbaac2

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Icca4e3c83e56e98ca8ab7aaf8ece96f39e34e48d
aries | p1: add frandom character device

frandom kernel random number generator 
http://www.billauer.co.il/frandom.html

Squashed commit of:
https://github.com/f1vefour/supernatural-kernel/commit/8564e1af9b62f0c946afd7eef8bcc12344137353
https://github.com/f1vefour/supernatural-kernel/commit/95c81553596a0368212936c71f7d2f470f5d4803
https://github.com/f1vefour/supernatural-kernel/commit/5c1ef4b7565b6bf1b8807a05f369ec9df2ef8dce

PS2: rebase
PS3: rebase
PS4: commit message

Change-Id: Icd8b2861156265bc0da4da5030f54453e99bc4a7
aries: block: add sio (simple i/o) scheduler

Change-Id: Id85d781fd45f0b700e9109731c65219f7f06d8d5
p1: drivers: input: tsp: remove keyled brightness log spam

the key led brightness is changing accordingly
light sensor then it is writing log spam over
kernel messages /proc/kmsg
so, just comment out it.


Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I440fd477db64f41c7d55800726e6a70e460fca62
block: separate priority boosting from REQ_META

Add a new REQ_PRIO to let requests preempt others in the cfq I/O schedule,
and lave REQ_META purely for marking requests as metadata in blktrace.

All existing callers of REQ_META except for XFS are updated to also
set REQ_PRIO for now.

Backported to 3.0.101 by Ketut Putu Kumajaya <ketut.kumajaya@gmail.com>

Change-Id: I9df68c8ff5816e8793e73cd7321afc68c29552a9
rwsem: R/W semaphores implemented using ARM atomic functions

Change-Id: Id10e8c9b04b51f435e477aab91a2869497c04948
aries | p1: config: add R/W semaphores

implemented using ARM atomic functions

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Id88277fa6de6d37294bd01d183db101c4044331d
Merge "rwsem: R/W semaphores implemented using ARM atomic functions" into android-4.4
Merge "aries | p1: config: add R/W semaphores" into android-4.4
p1: add lvm support [3]

add back /data to onenand
add lvm for system and data
increase /system to 800M
used aries/crespo devices as example

Dependencies:

1. https://gerrit.omnirom.org/#/c/6959/ 
2. https://gerrit.omnirom.org/#/c/6960/ 

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I65820a12b53c338a8f8b4a2d6910c029c6134ae6
Input: Use accessor for MT values

The current MT accessor function does not distinguish between the MT
values and the slot specification event. Add an accessor function for
the values only, and use it where appropriate.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Change-Id: Ic1f230bb14bb5065ae5831e2ca88568152cede19
Input: Add enabled device attribute

Allows closing the hardware device while the input device is open.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Change-Id: I91b6e24f14b3334d17bfe8e5f86d2b33c85e1ea1
Input: Set users to 0 when an input device is disabled though sysfs

Some drivers check dev->users suspend and resume. If the device
was turned off with the sysfs hook, it should not turn back on
in resume.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Change-Id: Iff17fdac307ec9c27744ac886f9dc94aac665c80
Input: Add EVIOC mechanism for MT slots

This patch adds the ability to extract MT slot data via a new ioctl,
EVIOCGMTSLOTS. The function returns an array of slot values for the
specified ABS_MT event type.

Example of user space usage:

struct { unsigned code; int values[64]; } req;
req.code = ABS_MT_POSITION_X;
if (ioctl(fd, EVIOCGMTSLOTS(sizeof(req)), &req) < 0)
	return -1;
for (i = 0; i < 64; i++)
	printf("slot %d: %d\n", i, req.values[i]);

Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Change-Id: I7bb37860aac3bc5c9f064bd0622ed87ee7410b63
Input: add infrastructure for selecting clockid for event time stamps

As noted by Arve and others, since wall time can jump backwards, it is
difficult to use for input because one cannot determine if one event
occurred before another or for how long a key was pressed.

However, the timestamp field is part of the kernel ABI, and cannot be
changed without possibly breaking existing users.

This patch adds a new IOCTL that allows a clockid to be set in the
evdev_client struct that will specify which time base to use for event
timestamps (ie: CLOCK_MONOTONIC instead of CLOCK_REALTIME).

For now we only support CLOCK_MONOTONIC and CLOCK_REALTIME, but
in the future we could support other clockids if appropriate.

The default remains CLOCK_REALTIME, so we don't change the ABI.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Change-Id: I9d34528d467501d5fac948d85f81b61c0e82fd2f
Input: evdev - fix variable initialisation

Commit 509f87c5f564 (evdev - do not block waiting for an event if fd
is nonblock) created a code path were it was possible to use retval
uninitialized.

This could lead to the xorg evdev input driver getting corrupt data
and refusing to work with log messages like
	AUO-Pixcir touchscreen: Read error: Success
	sg060_keys: Read error: Success
	AUO-Pixcir touchscreen: Read error: Success
	sg060_keys: Read error: Success
(for drivers auo-pixcir-ts and gpio-keys).

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Change-Id: Ic6df546ad278988be369fba4e0bf5e8f0a974bb6
input: keyreset: process pressed keys at init

Bug: 7344361
Signed-off-by: Dima Zavin <dima@android.com>
Change-Id: I92c9ec8a7d2882f280af9a5807a6052e54ecc16a
input: keyreset: move init to subsys to be ready early

Bug: 7344361
Signed-off-by: Dima Zavin <dima@android.com>
Change-Id: I3564a354fddd69f352704c9e819ea4538096264a
input: keyreset: add support for reset after timeout

If a timeout is requested, a delayed work item will be
scheduled to restart the device. If the keys are released
before the timeout expires, the reset is aborted.

As expected, the reset_fn can be used to reset the device
after the timeout.

Bug: 7344361
Signed-off-by: Dima Zavin <dima@android.com>
Change-Id: I1d77cdb3dcc63f579b1250506f0a30de1e033d67