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>

Conflicts:

	arch/arm/mach-msm/msm_mpdecision.c
cmdline_khz: move check_khz function to cpufreq.h

This will allow using this function independent of acpuclock.h

Conflicts:

	include/linux/cpufreq.h
update to 3.33 source from HTCDev

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

Conflicts:

	arch/arm/configs/bricked_defconfig
	drivers/gpu/msm_adreno220/adreno.c
	drivers/gpu/msm_adreno220/adreno_postmortem.c
	drivers/gpu/msm_adreno220/kgsl.c
	drivers/gpu/msm_adreno220/kgsl_device.h
	drivers/gpu/msm_adreno220/kgsl_pwrctrl.c
	drivers/gpu/msm_adreno220/kgsl_pwrscale_idlestats.c
	drivers/gpu/msm_adreno220/z180.c
	drivers/misc/pm8xxx-vibrator.c

Conflicts:

	arch/arm/configs/bricked_defconfig
	drivers/gpu/msm_adreno220/adreno.h
	drivers/misc/pm8xxx-vibrator.c
msm: pm-8x60: Move hotplug related code out of pm code.

Move hotplug related code into hotplug.c and compile hotplug.c only when
CONFIG_HOTPLUG_CPU is defined.

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Change-Id: Ia9aa7a64e9831f52431c77c22f30fb64892efaea

Conflicts:

	arch/arm/mach-msm/hotplug.c
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 !

USB forced fast charge v2

Soft force mode (2) is validated.

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

For informational purposes I've also added a read-only sysfs file that indicates the USB port type : (new)

 * /sys/kernel/fast_charge/USB_porttype_detected (ro)
 *
 * The port type will be returned in clear text.

USB forced fast charge v2

Corrected wrong detection of USB cable unplugged to reset "USB_porttype_detected", just informational, so nothing important, but it was wrong nonetheless and needed correcting.

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

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

 * /sys/kernel/fast_charge/USB_porttype_detected (ro)
 *
 * The port type will be returned in clear text.

USB forced fast charge v2

/sys/kernel/fast_charge/USB_peripheral_detected returns clear text now as well.

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)
 *
 * The state will be returned in clear text (Yes/No).

For informational purposes I've also added a read-only sysfs file that indicates the detected USB port type :

 * /sys/kernel/fast_charge/USB_porttype_detected (ro)
 *
 * The port type will be returned in clear text.

USB forced fast charge v2

Small correction, forgot to remove the old line of code.

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)
 *
 * The state will be returned in clear text (Yes/No).

For informational purposes I've also added a read-only sysfs file that indicates the detected USB port type :

 * /sys/kernel/fast_charge/USB_porttype_detected (ro)
 *
 * The port type will be returned in clear text.
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>
[patch] iosched: prevent aliased requests from starving other I/O

http://lkml.indiana.edu/hypermail/linux/kernel/1106.0/00548.html

Hi, Jens,

If you recall, I posted an RFC patch for this back in July of last year:
http://lkml.org/lkml/2010/7/13/279

The basic problem is that a process can issue a never-ending stream of
async direct I/Os to the same sector on a device, thus starving out
other I/O in the system (due to the way the alias handling works in both
cfq and deadline). The solution I proposed back then was to start
dispatching from the fifo after a certain number of aliases had been
dispatched. Vivek asked why we had to treat aliases differently at all,
and I never had a good answer. So, I put together a simple patch which
allows aliases to be added to the rb tree (it adds them to the right,
though that doesn't matter as the order isn't guaranteed anyway). I
think this is the preferred solution, as it doesn't break up time slices
in CFQ or batches in deadline. I've tested it, and it does solve the
starvation issue. Let me know what you think.

Cheers,
Jeff
cmdline_scheduler: add initial parsing and failsafes
update to 3.33 source from HTCDev

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

Conflicts:

	arch/arm/configs/bricked_defconfig
	drivers/gpu/msm_adreno220/adreno.c
	drivers/gpu/msm_adreno220/adreno_postmortem.c
	drivers/gpu/msm_adreno220/kgsl.c
	drivers/gpu/msm_adreno220/kgsl_device.h
	drivers/gpu/msm_adreno220/kgsl_pwrctrl.c
	drivers/gpu/msm_adreno220/kgsl_pwrscale_idlestats.c
	drivers/gpu/msm_adreno220/z180.c
	drivers/misc/pm8xxx-vibrator.c

Conflicts:

	drivers/gpu/msm_adreno220/adreno.h
	drivers/misc/pm8xxx-vibrator.c
msm: Config option to enable idle stats device

MSM_SLEEP_STATS_DEVICE option is used to compile idle stats device
framework which is needed for GPU DCVS feature.

Change-Id: I9550c90054587aa4fcec40131761eeaf54da8a03
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
sweep2unlock: Add sweep2unlock v0.1

Thanks to Ezekeel's gladoskernel source which helped me
a lot in understanding how to emulate a virtual powerkey press.
The powerkey emulation is largely inspired by his coding for
Touch2Wake (Galaxy Nexus).
sweep2wake: Add Kconfig entry

Conflicts:

	drivers/input/misc/gpio_event.c
	drivers/input/touchscreen/cy8c_tma_ts.c
	include/linux/cy8c_tma_ts.h
sweep2wake: Add Kconfig entry

Conflicts:

	drivers/input/misc/gpio_event.c
	drivers/input/touchscreen/cy8c_tma_ts.c
	include/linux/cy8c_tma_ts.h
patch: pyramid wwe updates

Conflicts:

	drivers/gpu/drm/nouveau/nouveau_gem.c
	drivers/gpu/drm/radeon/radeon_irq_kms.c
	drivers/media/video/uvc/uvc_v4l2.c
	drivers/misc/pm8xxx-vibrator.c
	drivers/net/usb/usbnet.c
	drivers/usb/class/cdc-wdm.c
	drivers/usb/serial/ftdi_sio.c
	drivers/usb/serial/option.c
	drivers/xen/xenbus/xenbus_xs.c
	sound/pci/intel8x0.c
drivers: net: wifi: bcmdhd: update to One V source

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

Conflicts:

	drivers/net/wireless/bcmdhd/dhd_linux.c
	drivers/net/wireless/bcmdhd/wl_android.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
	drivers/net/wireless/bcmdhd/wldev_common.c
drivers: net: wireless: add bcmdhd

Some ppl want to check out if this fixes Sense 4 wifi hotspot issues,
so here ya go. :)

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

Conflicts:

	drivers/net/wireless/bcmdhd/aiutils.c
	drivers/net/wireless/bcmdhd/bcmevent.c
	drivers/net/wireless/bcmdhd/bcmsdh.c
	drivers/net/wireless/bcmdhd/bcmsdh_linux.c
	drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c
	drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
	drivers/net/wireless/bcmdhd/bcmutils.c
	drivers/net/wireless/bcmdhd/bcmwifi.c
	drivers/net/wireless/bcmdhd/dhd.h
	drivers/net/wireless/bcmdhd/dhd_bta.c
	drivers/net/wireless/bcmdhd/dhd_bta.h
	drivers/net/wireless/bcmdhd/dhd_bus.h
	drivers/net/wireless/bcmdhd/dhd_cdc.c
	drivers/net/wireless/bcmdhd/dhd_common.c
	drivers/net/wireless/bcmdhd/dhd_custom_gpio.c
	drivers/net/wireless/bcmdhd/dhd_dbg.h
	drivers/net/wireless/bcmdhd/dhd_linux.c
	drivers/net/wireless/bcmdhd/dhd_linux_sched.c
	drivers/net/wireless/bcmdhd/dhd_proto.h
	drivers/net/wireless/bcmdhd/dhd_sdio.c
	drivers/net/wireless/bcmdhd/dngl_stats.h
	drivers/net/wireless/bcmdhd/hndpmu.c
	drivers/net/wireless/bcmdhd/include/aidmp.h
	drivers/net/wireless/bcmdhd/include/bcmcdc.h
	drivers/net/wireless/bcmdhd/include/bcmdefs.h
	drivers/net/wireless/bcmdhd/include/bcmdevs.h
	drivers/net/wireless/bcmdhd/include/bcmendian.h
	drivers/net/wireless/bcmdhd/include/bcmsdbus.h
	drivers/net/wireless/bcmdhd/include/bcmsdh.h
	drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h
	drivers/net/wireless/bcmdhd/include/bcmsdpcm.h
	drivers/net/wireless/bcmdhd/include/bcmutils.h
	drivers/net/wireless/bcmdhd/include/bcmwifi.h
	drivers/net/wireless/bcmdhd/include/dhdioctl.h
	drivers/net/wireless/bcmdhd/include/epivers.h
	drivers/net/wireless/bcmdhd/include/hndpmu.h
	drivers/net/wireless/bcmdhd/include/hndsoc.h
	drivers/net/wireless/bcmdhd/include/linux_osl.h
	drivers/net/wireless/bcmdhd/include/linuxver.h
	drivers/net/wireless/bcmdhd/include/msgtrace.h
	drivers/net/wireless/bcmdhd/include/osl.h
	drivers/net/wireless/bcmdhd/include/packed_section_end.h
	drivers/net/wireless/bcmdhd/include/packed_section_start.h
	drivers/net/wireless/bcmdhd/include/pcicfg.h
	drivers/net/wireless/bcmdhd/include/proto/802.11.h
	drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h
	drivers/net/wireless/bcmdhd/include/proto/802.1d.h
	drivers/net/wireless/bcmdhd/include/proto/bcmeth.h
	drivers/net/wireless/bcmdhd/include/proto/bcmevent.h
	drivers/net/wireless/bcmdhd/include/proto/bcmip.h
	drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
	drivers/net/wireless/bcmdhd/include/proto/ethernet.h
	drivers/net/wireless/bcmdhd/include/proto/p2p.h
	drivers/net/wireless/bcmdhd/include/proto/vlan.h
	drivers/net/wireless/bcmdhd/include/proto/wpa.h
	drivers/net/wireless/bcmdhd/include/sbchipc.h
	drivers/net/wireless/bcmdhd/include/sbconfig.h
	drivers/net/wireless/bcmdhd/include/sbhnddma.h
	drivers/net/wireless/bcmdhd/include/sbpcmcia.h
	drivers/net/wireless/bcmdhd/include/sbsdio.h
	drivers/net/wireless/bcmdhd/include/sbsdpcmdev.h
	drivers/net/wireless/bcmdhd/include/sbsocram.h
	drivers/net/wireless/bcmdhd/include/sdio.h
	drivers/net/wireless/bcmdhd/include/sdioh.h
	drivers/net/wireless/bcmdhd/include/sdiovar.h
	drivers/net/wireless/bcmdhd/include/siutils.h
	drivers/net/wireless/bcmdhd/include/typedefs.h
	drivers/net/wireless/bcmdhd/include/wlioctl.h
	drivers/net/wireless/bcmdhd/linux_osl.c
	drivers/net/wireless/bcmdhd/sbutils.c
	drivers/net/wireless/bcmdhd/siutils.c
	drivers/net/wireless/bcmdhd/siutils_priv.h
	drivers/net/wireless/bcmdhd/wl_android.c
	drivers/net/wireless/bcmdhd/wl_android.h
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.h
	drivers/net/wireless/bcmdhd/wl_cfgp2p.c
	drivers/net/wireless/bcmdhd/wl_cfgp2p.h
	drivers/net/wireless/bcmdhd/wl_iw.c
	drivers/net/wireless/bcmdhd/wl_iw.h
	drivers/net/wireless/bcmdhd/wldev_common.c
	drivers/net/wireless/bcmdhd/wldev_common.h
bcmdhd: just fix a space fail :) came up when merging cherry picks.

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

Conflicts:

	drivers/net/wireless/bcmdhd/wl_cfgp2p.h

Conflicts:

	drivers/net/wireless/bcmdhd/wl_cfgp2p.h
drivers: bcmdhd: fix array subscript is above array bounds in wl_cfgp2p.c:759

Conflicts:

	drivers/net/wireless/bcmdhd/wl_cfgp2p.c
driver/thermal: create kernel MSM thermal management for MSM8x60 SOC

Conflicts:

	drivers/thermal/Kconfig
	drivers/thermal/msm8x60_tsens.c
	drivers/thermal/msm_thermal.c
thermal: make debug message more meaningful and useful

also print CPU temperature reading ~20 sec interval