various: add HTC specific files from ville source release

Kernel source from TMOUS 1.84.531 release:
ville-ics-crc-3.0.8-ca24d1e
Documentation: remove autogenerated file
various: gpu and video fixup from Sprint Evo 4G LTE 1.13.651

Kernel source from Sprint 1.13.651 release:
jewel-ics-crc-3.0.8-3fd0422
gpu: msm: remove device-specific adreno directory
video: msm: remove msm_8x60 directory
include: linux: msm_vidc_enc: revert HTC's weird pbuffer definition
genlock: undo HTC genlock changes
various: compilation fixes for gcc 4.6

These changes are required to compile successfully with
gcc version 4.6.

The -Wno-address option is applied to some files to
bypass a warning triggered by an rcu macro. The
warning is fixed cleanly upstream, but that fix is too
risky to backport, so it is better to just silence it
this way.

Change-Id: I787ad2db6e649d29874b7b624c2b28f686236466
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8930.c
	arch/arm/mach-msm/scm.c
various: fix warnings for kernel compile

These changes suppress or fix warnings, in particular
-Wno-cpp, -Wenum-compare, -Wunused-value
arm: Allow CPU-supported unaligned accesses

This change reconfigures the CPU to allow CPU-supported aligned
accesses, which are generally faster than software-only fixups,
resulting in fewer alignment exceptions.

Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>
input: touchscreen: atmel_224e: import touchscreen fix from ville kernel

This is a squash of the following commits:

input: touchscreen: atmel_224e: more code cleanup

Check for the negative cases and exit early to make things more
readable, remove redundant checks, indentation, remove some debugging
statements, make code more readable.

input: touchscreen: atmel_224e: recalibrate after last finger release

This mimics how HTC does a recalibration after last finger release to
get around the issue where the touchscreen is terrible and reports a
finger release event to every finger when it should only report one.

input: touchscreen: atmel_224e: formatting

msm: ville: disable unlock_attr for atmel touchscreen

We are not using HTC's framework which makes use of this sysfs file.
msm: acpuclock-8960: allow 192MHz minimum voltage
msm: ville: lower minimum voltage for regulators S5, S6
msm: ville: reduce light current
drivers: usb: reset USB drivers back to CAF

Undo HTC changes to the Android USB gadget driver, reset back to CAF at
initial import of HTC drivers. This brings Android USB gadget driver
back in line with CAF at commit id:
8987911c69d7e3e79da6f9b53d733d7d74f20775
"msm: video: Update macros to use readl/writel".
usb: core: remove dangling reference to undefined variable
base: genlock: Use a signed long for the result from wait_timeout

interruptible_wait_timeout returns a signed long, so make sure that
we use a signed long to hold the result. Using an unsigned value would
horribly misinterpet an error such as -ERESTARTSYS.

CRs-Fixed: 341347
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit be669bc92358653a46c63f2352e6d981f9ed3bdf)

Change-Id: Ifcf555f8719f9c74fdb6d8b5cf2a32582988335b
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
base: genlock: allow synchronization with a single gralloc handle

In order to support synchronization in a process with a single
gralloc handle we require the ability to write lock a buffer
while it is already read locked by the same handle. This change
extends the concept of an exclusive write lock or recursive read
locks to a genlock handle (rather than the genlock lock).
Genlock cannot provide deadlock protection because the same
handle can be used simultaneously by a producer and consumer.
In practice an error will still be generated when the timeout
expires.

CRs-fixed: 356263

Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit 6d9076fe46bcba71986a25cf357e71a4d83958c1)

Change-Id: I5d02591586023f4b622915522e2e038c16c9f2f2
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
base: genlock: remove BIT macro usage

The BIT macro is not defined for !_KERNEL_ resulting in compile errors.

CRs-fixed: 356263
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit 0977510e0f72b2f1a24f41d5154c2f1b80c96d9a)

Change-Id: Iaf188a1af838c98ca30ce216d7be8ddf85db700c
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
base: genlock: protect kref counting with spinlock

A race condition exists where the attach may not kref_get
before the kref_put finished. The genlock_file_lock was
originally added to protect against this case however it
was not protecting the kref.

CRs-fixed: 359649
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit d6f534fc51eb5fc23d08dacceecd42a4b98747a6)

Change-Id: I4115ea1cc39ebe38ad0032ebf86871ac9d23a312
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>