vfp: hardfloat
Enable pipe flag.

Signed-off-by: shivamk11 <shivamk11@gmail.com>
lib/memcopy: use glibc version

the kernel's memcpy and memmove is very inefficient. But the glibc version is
quite fast, in some cases it is 10 times faster than the kernel version. So I
introduce some memory copy macros and functions of the glibc to improve the
kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>
LCD_KCAL: Introduce configurable kcal_min

Lower values such as 0-10 ultimately create a dark, washed out display, if a user accidently sets their kcal values to "0 0 0" they will loose visual control of the device, potentially requiring a hard reboot.
Introduce minimum kcal values to prevent this behavior.

Willing users can disable this protection by setting the kcal_min value to '0', however the default value of 35 is recommended.

sysfs:
echo "1/255" > /sys/devices/platform/kcal_ctrl.0/kcal_min

kcal_min will detect and block values attempting to set lower than itself, resetting the specific values to that of kcal_min. There is also behavior to adjust the kcal if kcal_min is set to a level higher than that of any kcal value(s).

Signed-off-by: shivamk11 <shivamk11@gmail.com>
LCD_KCAL: Prevent out-of-range input values

Signed-off-by: shivamk11 <shivamk11@gmail.com>
initial s2w dt2w code import from @showp1984

Signed-off-by: shivamk11 <shivamk11@gmail.com>
sweep2wake/doubletap2wake: adapt for Moto G

Signed-off-by: shivamk11 <shivamk11@gmail.com>
mdss:mdss_dsi_panel.c: add s2wake/dt2wake screen on/off hooks

Signed-off-by: shivamk11 <shivamk11@gmail.com>
ARM: use -mcpu=cortex-a7 when targeting MSM8226 CPUs (Cortex-A7 based)

this is done in order to force compliant GCC compiler to generate the new
sdiv/udiv instructions supported by Cortex-A7 architecture

Signed-off-by: shivamk11 <shivamk11@gmail.com>
s2w: remove all s2sonly code

Signed-off-by: shivamk11 <shivamk11@gmail.com>
s2w: Add bidirectional sweep2sleep

Signed-off-by: shivamk11 <shivamk11@gmail.com>
Add /dev/frandom
powersuspend: new PM kernel driver for Android w/o early_suspend

Android early_suspend/late_resume PM kernel driver framework has been
deprecated by Google. This new powersuspend PM kernel driver is a replacement
for it and existing early_suspend drivers can be easily adapted to use this
new replacement driver

powersuspend: fix logci derps :p

Signed-off-by: shivamk11 <shivamk11@gmail.com>
kernel/power/powersuspend: remove userspace dependency from powersuspend

make powersuspend not depend on a userspace initiator anymore, but use a hook
in autosleep instead.

Signed-off-by: shivamk11 <shivamk11@gmail.com>
kernel/power/powersuspend: add back userpace control w/ default kernel control

make kernel / userspace mode switchable

Signed-off-by: shivamk11 <shivamk11@gmail.com>
kernel/power/powersuspend: default to userspace for now

Signed-off-by: shivamk11 <shivamk11@gmail.com>
kernel/power/powersuspend: LCD screen on/off hooks

- add an alternative hook for screen on / off detection in the display
  pannel driver
- sleeps  ~0.1s sooner, wakes up ~1s later then autosleep
- clean up source formatting a bit (Paul Reioux)

Signed-off-by: shivamk11 <shivamk11@gmail.com>
mdss_dsi_panel.c: add powersuspend hooks

Signed-off-by: shivamk11 <shivamk11@gmail.com>
kernel/power/powersuspend: cumulative update to version 1.5

- fix hybrid-kernel mode cannot be set through sysfs

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.4 (Yank555.lu)

- add hybrid-kernel mode (autosleep and panel, first wins)
- default to hybrid-kernel mode
- harmonize debug message with my other stuff
- include all 3 modes as default, so it's only commenting out to change

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.3 (Yank555.lu)

- fix stupid typo
- add an alternative hook for screen on / off detection in the display panel driver
(sleeps ~0.1s sooner, wakes up ~1s later then autosleep)

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.2 (Yank555.lu)

- make kernel / userspace mode switchable

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend v1.1 (Yank555.lu)

- make powersuspend not depend on a userspace initiator anymore, but use a hook in autosleep instead.

kernel/power/powersuspend: new PM kernel driver for Android w/o early_suspend (faux123)

Android early_suspend/late_resume PM kernel driver framework has been
deprecated by Google. This new powersuspend PM kernel driver is a replacement
for it and existing early_suspend drivers can be easily adapted to use this
new replacement driver

Signed-off-by: shivamk11 <shivamk11@gmail.com>