GPU Simple Governor: adapt GPU Simple Governor for Snapdrgaon 800 SOCs

initial coding for a Simple GPU governor based on my own work 2 years ago
from Sensation GB kernel commit: c1ea8f6

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: flar2 <asegaert@gmail.com>
Revert "GPU Simple Governor: adapt GPU Simple Governor for Snapdrgaon 800 SOCs"

This reverts commit c1671c89797ac46a8a96a44df64ea747930e4f5e.
CHROMIUM: mm: Fix calculation of dirtyable memory

The system uses global_dirtyable_memory() to calculate
number of dirtyable pages/pages that can be allocated
to the page cache.  A bug causes an underflow thus making
the page count look like a big unsigned number.  This in turn
confuses the dirty writeback throttling to aggressively write
back pages as they become dirty (usually 1 page at a time).

Fix is to ensure there is no underflow while doing the math.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Puneet Kumar <puneetster@chromium.org>

BUG=chrome-os-partner:16011
TEST=Manual; boot kernel, powerwash, login with testaccount and
make sure no jank occurs on sync of applications

Change-Id: I614e7c3156e014f0f28a4ef9bdd8cb8a2cd07b2a
Reviewed-on: https://gerrit.chromium.org/gerrit/37612
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Tested-by: Puneet Kumar <puneetster@chromium.org>
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: Paul Reioux <reioux@gmail.com>

Conflicts:
	include/linux/powersuspend.h
	kernel/power/powersuspend.c
Revert "kernel/power/powersuspend: remove userspace dependency from powersuspend"

This reverts commit 9c3534bc64625b325955ae3feb80e5f737489470.
sound_control: add headset, speaker and mic gain interfaces. Also add the sysfs control file.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
drivers: misc: removed this by mistake on a previous commit.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Merge remote-tracking branch 'franco/android-msm-hammerhead-3.4-kk-r1' into android-msm-hammerhead-3.4-kk-r1