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
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>
USB forced fast charge

Thanx to Chad Froebel for posting his mod for the Galaxy Nexus !
(http://rootzwiki.com/topic/19720-kernel-patch-devs-only-force-ac-fast-charging/)

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/htc_battery_8x60.c
config: updates for fast_charge

Signed-off-by: showp1984 <showp1984@gmail.com>
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.