[PATCH] mfd: pm8821-core: Add support for PMIC thermal alarm

Add a pm8xxx-tm subdevice into pm8821-core.  The pm8xxx-tm device
can be used to receive an interrupt when critical temperature
thresholds are reached.  Since PM8821 does not have an ADC, it is
not possible to read a real time PM8821 die temperature using
this pm8xxx-tm device.

Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit 1604779c47df4bf003211c35e356210e689676d5)

Change-Id: I3a9bc516ae364d27d116beb83e90c2f1c2382935
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Bluetooth: Resolved a race condition

Due to simultaneous disconnects from HCI and SCO
this race condtion arrives. While doing SCO disconnect
a null pointer check for HCI connection should be present
to avoid any crash due to this condtion.

(cherry picked from commit 744098c26b667ae4599c2aabe7459a09b7a4d43d)

Change-Id: Iee8c69bb7a09bcfbbc5fc3dae65c66151820255d
CRs-Fixed: 415887
Signed-off-by: Nitin Srivastava <nitinsr@codeaurora.org>
fastcharge v1

Conflicts:

	drivers/misc/fsa9485.c
fsa9485: fastcharge v3 - fixed, finally tracked this down
ACPU: Removed non-8960 code
cpufreq/ondemand: add early suspend drivers to adjust cpu sampling rates

screen off: 6 * min sampling rate to reduce power consumption
screen on: normal sampling rate set by init
OC: Upped max overvolt to 1400000
auto_hotplug.c: we're now scaling the cores based on the NVIDIA's avg_running code so now the driver will be less hard on the system because we got rid of the history cycle and multiplication before deciding when to online/offline cores.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
drivers: msm_thermal: make thermal throttle temperature threshold user configurable.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "fsa9485: fastcharge v3 - fixed, finally tracked this down"

This reverts commit c22b5dea30464d60970853ce4820ed3cfdff7aa3.
Revert "fastcharge v1"

This reverts commit 8ff9974d6e6a64c9faac0bc96c6280aca4d9b139.
test without topo
block: Add API for urgent request handling

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

block: Add support for reinsert a dispatched req
Add support for reinserting a dispatched request back to the
scheduler's internal data structures.
This capability is used by the device driver when it chooses to
interrupt the current request transmission and execute another (more
urgent) pending request. For example: interrupting long write in order
to handle pending read. The device driver re-inserts the
remaining write request back to the scheduler, to be rescheduled
for transmission later on.

Add API for verifying whether the current scheduler
supports reinserting requests mechanism. If reinsert mechanism isn't
supported by the scheduler, this code path will never be activated.

Change-Id: I5c982a66b651ebf544aae60063ac8a340d79e67f
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
block: row: squash commits from codeaurora.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: remove dynamic sampling time based on online cores and schedule the works in a 100ms sampling rate. Also cleanup how check for boostpulse flag to reduce reduntant function calls. Also reduced enable_all_threshold from 500 to 425 otherwise it would be really hard to have them all enabled at a certain point of time. Maybe it easier to stay on all cores if the load is above the threshold - there was a small bug here that almost prevented all the cores to stay up until the load gets down.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
block: squashed set of commits

[PATCH] block: remove elevator_queue->ops

elevator_queue->ops points to the same ops struct ->elevator_type.ops
is pointing to.  The only effect of caching it in elevator_queue is
shorter notation - it doesn't save any indirect derefence.

Relocate elevator_type->list which used only during module init/exit
to the end of the structure, rename elevator_queue->elevator_type to
->type, and replace elevator_queue->ops with elevator_queue->type.ops.

This doesn't introduce any functional difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

PATCH] block: reorder elevator switch sequence

Elevator switch sequence first attached the new elevator, then tried
registering it (sysfs) and if that failed attached back the old
elevator.  However, sysfs registration doesn't require the elevator to
be attached, so there is no reason to do the "detach, attach new,
register, maybe re-attach old" sequence.  It can just do "register,
detach, attach".

* elevator_init_queue() is updated to set ->elevator_data directly and
  return 0 / -errno.  This allows elevator_exit() on an unattached
  elevator.

* __elv_unregister_queue() which was necessary to unregister
  unattached q is removed in favor of __elv_register_queue() which can
  register unattached q.

* elevator_attach() becomes a single assignment and obscures more then
  it helps.  Dropped.

This will help cleaning up io_context handling across elevator switch.

This patch doesn't introduce visible behavior change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Revert "block: squashed set of commits"

This reverts commit 9f6cd72d03cf39d1b8bd33b6c6137d569fc01eba.
OC: Limit speed to 1.512GHz
RAMDISK: Limit boot speed and enable boot animations
GOV: Interactive update squash