cpufreq: interactive: take idle notifications only when active

Register an idle notifier only when the governor is active.  Also
short-circuit work of idle end if the governor is not enabled.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: I4cae36dd2e7389540d337d74745ffbaa0131870f
cpufreq: interactive: keep freezer happy when not current governor

Fix a problem where the hung task mechanism was deeming the interactive
clock boost thread as hung.  This was because the thread is created at
module init but never run/woken up until needed.  If the governor is not
being used this can be forever.  To workaround this explicitly wake up
the thread once all the necessary data structures are initialized.  The
latter required some minor code shuffle.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: Ie2c058dd75dcb6460ea10e7ac997e46baf66b1fe
cpufreq: interactive: handle speed up and down in the realtime task

Not useful to have a separate, non-realtime workqueue for speed down
events, avoid priority inversion for speed up events.

Change-Id: Iddcd05545245c847aa1bbe0b8790092914c813d2
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq: interactive: remove input_boost handling

Now handled in userspace Power HAL instead.

Change-Id: I78a4a2fd471308bfcd785bbefcc65fede27314cf
Signed-off-by: Todd Poynor <toddpoynor@google.com>
msm: smp: Remove WFE/SEV from secondary core bootup

During the cold boot path once the secondary core is released
out of reset we keep looping for the pen release variable.
The wfe+sev in this path are just unnecessary as they provide
negligible power savings, and the latency cost is not worth it.
During the hotplug path the secondary core will be in wfi and
only an interrupt will be able to bring the core out.
Removing the wfe effectively lowers the hotplug latency.

CRs-Fixed: 372035
Change-Id: Ife39339ec09181a4ca3cd3755733662bd8842c0c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
drivers: cpufreq: Send a uevent when governor changes

 * Useful so userspace tools can reconfigure.

Change-Id: Ib423910b8b9ac791ebe81a75bf399f58272f64f2
i2c-algo-bit: Don't resched on clock stretching

Clock stretching is not supposed to last long, so asking to be
rescheduled while waiting for the clock line to be released by a slave
makes little sense. Odds are that the clock line will long have been
released when we run again, so we will have lost time and may even
get an SMBus timeout because of this.

So just busy-wait in that case. This also participates in the effort
to make i2c-algo-bit usable in contexts that can't sleep.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Skeggs <bskeggs@redhat.com>