USB: Allow skipping device resume during system resume
Some buses would like to keep their devices in suspend state during
system resume.  For example HSIC controller driver prevent system
suspend when HSIC device is active.  If this device is resumed, during
system resume HSIC controller acquire wake lock and prevent the
subsequent suspend till HSIC device is auto suspended.
USB: Prevent system suspend when HSIC device is active
Some buses like HSIC would like to keep device in suspend state
after system resume.  The remote wakeup or interface activity
later will auto resume the device.  This will work only if the
device is auto suspended before system suspend.  If the device
runtime state had been active during system suspend and system
suspend routine put the device in suspend, it will not be resumed
during system resume.  When remote wakeup happen for this device,
the runtime resume will not bring the device to active as runtime
core think it is already active.

The HSIC bus ensure that device is auto suspended prior to system
suspend by holding a wakelock till the bus is suspended.  HSIC bus
is not handling the case where device is auto resumed immediately
after system suspend begins.  HSIC bus simply put the device into
suspend in system suspend routine.

This patch fixes above issue by returning an error code if the device
is not auto suspended during system suspend.  Also add a safe guard
check in HSIC system resume routine to skip device resume only if it
is auto suspended prior to system suspend.
cpufreq: ondemand: Fix kernel warning in cpufreq_governor_dbs

GOV_STOP event destroys the timer_mutex and is not initialized back
upon GOV_START event.
The Kernel complains at mutex_lock(during GOV_LIMITS event) after
mutex_destroy.

[<c0014918>] (unwind_backtrace+0x0/0x11c)
[<c007c004>] (warn_slowpath_common+0x4c/0x64)
[<c007c034>] (warn_slowpath_null+0x18/0x1c)
[<c079eef8>] (__mutex_lock_slowpath+0x130/0x3c4)
[<c079f1ac>] (mutex_lock+0x20/0x3c) from [<c0540900>]
[<c0540900>] (cpufreq_governor_dbs+0x3c8/0x468)
[<c053d500>] (__cpufreq_governor+0x90/0xe0)
[<c053d774>] (__cpufreq_set_policy+0x224/0x258)
[<c053da58>] (cpufreq_add_dev_interface+0x2b0/0x308)
[<c053e784>] (cpufreq_add_dev+0x500/0x56c)
[<c079247c>] (cpufreq_cpu_callback+0x88/0x9c)
[<c07a2ca8>] (notifier_call_chain+0x38/0x68)
[<c007ded0>] (__cpu_notify+0x28/0x40)
[<c0790024>] (_cpu_up+0xe4/0x118)
[<c0790024>] (cpu_up+0x64/0x80)
[<c0765840>] (store_online+0x48/0x78)
[<c038d0c8>] (dev_attr_store+0x18/0x24)
[<c017be40>] (sysfs_write_file+0x108/0x13c)
[<c012cdfc>] (vfs_write+0xb0/0x128)
[<c012d034>](sys_write+0x38/0x64)

Change-Id: Ie2a796b17209243de731ccf2ab04b7f9e7048df8
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
block: Add API for urgent request handling

This patch add support in block & elevator layers for handling
urgent requests. The decision if a request is urgent or not is taken
by the scheduler. Urgent request notification is passed to the underlying
block device driver (eMMC for example). Block device driver may decide to
interrupt the currently running low priority request to serve the new
urgent request. By doing so READ latency is greatly reduced in read&write
collision scenarios.

Note that if the current scheduler doesn't implement the urgent request
mechanism, this code path is never activated.

Change-Id: I8aa74b9b45c0d3a2221bd4e82ea76eb4103e7cfa
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

Conflicts:
	block/elevator.c
ARM: add auto hotplug driver

This driver is simple and cheap and aims to avoid unnecessary hotplug
events and unnecessary task migrations. The design is simple. The value
of nr_running() (which is the current number of runnable threads) is
averaged over X samples by a ringbuffer. If the value is over a
dynamically calculated value, all CPUs are onlined. When the value falls
under another dynamically calculated value, the CPUs are offlined with a
2 second delay. If there is persistent load on the system, the CPUs will
not continually thrash between onlining and offlining and continually
migrate tasks. The number of online CPUs will remain constant until the
load has dropped below the dynamically calculated value. The online and
offline values are dynamically scaled based on the number of CPUs
online, as is the sampling rate of the driver. This aims to reduce the
expense of the driver and also reduce the number of unless hotplug
transitions which could have been avoided had cpufreq been given the
chance to ramp the online CPUs up and deal with the load. This driver
will also offline secondary cores when the screen is turned off,
providing earlysuspend is available.

It also has a module param to set
the minimum number of online CPUs:
/sys/module/auto_hotplug/parameters/min_online_cpus
This value is ignored when the device enters earlysuspend, as the
secondary CPUs are all offlined, but is set again when the screen is
turned back on.
auto_hotplug: enable the min_online_cpus value

Use a module_param_cb to set the minimum number of online CPUs when the screen is on.

The values are between 1-4.

usage:
echo '1' < /sys/module/auto_hotplug/parameters/min_online_cpus
auto_hotplug: some tweaks

Several tweaks to try to improve battery life.
increase max readahead value