mach-msm: mpdecision: allow mpdecision to be disabled (sysfs)

This allows disabling/enabling of mpdecision over sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: sysfs: check if cpu is offline before hotplugging it

Signed-off-by: showp1984 <showp1984@gmail.com>
pyramid: update defconfig
Don't cap max screen off freq. (Partly reverts fc8e23)
Updated GPU OC

GPU is stock clocked at 3D@266 & 2D@200.

To increase maximum GPU frequency in 3D mode to 320 MHz:
echo 320000000 > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

To increase maximum GPU frequency in 2D mode to 266 MHz:
echo 266667000 > /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/max_gpuclk
echo 266667000 > /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/max_gpuclk

Available frequencies:
3D: 320000000, 300000000, 266667000, 228571000, 200000000, 177778000, 27000000
2D: 266667000, 228571000, 200000000, 160000000, 96000000, 27000000
cpufreq: fallback to 192000/1512000 min/max if CONFIG_MSM_CPU_FREQ_SET_MIN_MAX is not set, remove redundant stuff
include: mm: increase readahead buffer
mm: adjust vm ratios

increase swappiness by 50%
decrease dirty_ratio by 50%
add Wifi Screen-Off Power Management from franco.Kernel

This gives you the option to choose between PM_FAST and PM_MAX when your screen is off.
Normally the kernel uses PM_FAST only if the screen is on. But when the screen turns off, it switches to PM_MAX, which slows the wifi down to save battery.
But this can affect streaming applications (i.e. music). Which will result in lower quality audio or disconnects.

echo X > /sys/module/bcmdhd/parameters/wifi_pm
X can be 0 or 1. 0 (default) sets it to PM_MAX, and 1 sets it to PM_FAST.
Added FSync Control version 1.
pyramid: enable FSync Control
remove fsynccontrol_fsync_enabled(), rename fsync_enabled to fsynccontrol_fsync_enabled and move it to a header file
releasetools: add Wifi Screen-Off Power Management and FSync Controll to init-script
USB forced fast charge v2

Soft force mode has been added (= mode 2).

In this mode fast charge will only kick in if no USB device is detected (as should be the case for wall/car chargers). Please note that in this case fast charge will NOT work on a USB 2.0 and 3.0 port on a computer !

Use sysfs interface to change behaviour :

 * /sys/kernel/fast_charge/force_fast_charge (rw)
 *
 *   0 - disabled (default)
 *   1 - substitute AC to USB charging always
 *   2 - substitute AC to USB charging only if no USB peripheral is detected

For informational purposes I've also added a read-only sysfs file that indicates the current USB state :

 * /sys/kernel/fast_charge/USB_peripheral_detected (ro)
 *
 * 0 - No USB device currently attached
 * 1 - USB device currently attached

Consider this beta, it needs testing !
releasetools: updated to match forced fast charge v2
mach-msm: mpdecision: don't turn off cpu1 if freq > idle

This fixes cpu1 being turned off though it is still working
with a high frequency. The idle_freq can be modified through sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: fixup: move idle block to mpdecision()

This belongs in mp_decision() because this influences the decision
mpdecision is about to make.

Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: don't turn on cpu1 if cpu0 freq is below idle_freq
If the clock of cpu0 is below the set idle_freq don't enable cpu1 and
disregard the runqueue value.

Signed-off-by: showp1984 <showp1984@gmail.com>
acpi: add acpu_check_khz_value(); from bricked
Revert "drivers/net/wireless/bcmdhd: update from CM"

This reverts commit 43d68ea6a52f6fa0acdcde2a032b2e807369fe42.