CHROMIUM: cpufreq: interactive: delete timer at GOV_START

Make sure cpu_timer is deactivated before adding a new one.
This is similar to the fix from the android 3.10 tree, but applies to
our tree(there is no slack_timer in ChromeOS's interactive governor).

see b430123367e78a6557bac3cf1558bcb85193fb12 in android-tegra-3.10

BUG=chrome-os-partner:25195
TEST=set governor and note that kernel doesn't panic.

Change-Id: I9d058d2230aedeb708e8bf2a4f3dd3317ee9dc2b
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/183390
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
CHROMIUM: cpufreq: interactive: don't defer input open to workqueue

cpufreq_interactive defers opening of input devices from the
->connect() callback to a workqueue.  This introduces races
with the ->disconnect() callback and within the input core as
it expects the input_open_device() call to happen in ->connect().
The only advantage to deferring to a workqueue would be to improve
CPU up/down latency, but this should already be a low overhead
operation on systems where the UI is already monitoring input
devices.

BUG=None
TEST=Rapidly hotplug CPUs and a USB mouse; no crashes observed.

Change-Id: Ic5ffd117538a1b0349c07324f79aca7b76794f38
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186243
Reviewed-by: Dylan Reid <dgreid@chromium.org>
CHROMIUM: cpufreq: interactive: move work out of CPU hotplug path

CPUFREQ_GOV_{START,STOP} are used to notify the governor of CPU
topology changes and need not be used to set-up/tear-down global
governor state such as input device handles and sysfs entries.
Move these operations into the CPUFREQ_GOV_POLICY_{INIT,EXIT}
paths which will run when binding/unbinding the governor to a
specific policy.

Also, since cpufreq_interactive_boost() may now be called with
the governor stopped, have it check if the governor is enabled
before requesting that a CPU be boosted.

BUG=chrome-os-partner:26084
TEST=Build and boot on Nyan.  Lock the interactive governor to
2.1Ghz and hotplug CPUs; observe that hotplug latency is down
to around ~5ms.  Switching governors, suspend/resume, etc. still
work.

Change-Id: I18ec45200ed8d0ff69c0cc5c5633afb403897c7d
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187472
Reviewed-by: Dylan Reid <dgreid@chromium.org>