net: wireless: bcmdhd: Enable 5 GHz support

Update wiphy (wireless hardware description) to
support 5 GHz scan.

Bug 1000888

Change-Id: I1a7a99f97f69dd8f1790f81ee0fb21e209e8d10e
Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-on: http://git-master/r/109556
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
bluetooth: enable sleep only if chip supports

Some bt chips e.g TI wl12xx, do not support external wake using GPIO.
If bluesleep platform data does not contain external wake GPIO information,
bluesleep driver assumes, bt chip does not support external wake and disables
bluetooth chip power management.

Bluesleep driver is also modified to start and stop on HCI_DEV_UP and
HCI_DEV_DOWN events respectively.

bug 1006864

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I64c34f5816bd824da1c720175f9e93c16847299b
Reviewed-on: http://git-master/r/108498
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
ARM: tegra: clock: Increase boost_up_threshold for AVP clock

Increase the boost_up_threshold to 85 for ULP audio

bug 1009849

Change-Id: I4b1b746f445f5c2804befa52ae95c69b6b467083
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/114620
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
video: tegra: dc: support disp mode override via boot args

Allows overidding the default disp mode without having to recompile
the kernel. Boot args can be specified in the following format:

disp_params=<rgb|hdmi|dsi>:pclk,h_active,v_active,h_ref_to_sync,
v_ref_to_sync,h_sync_width,v_sync_width,h_back_porch,v_back_porch,
h_front_porch,v_front_porch;<rgb|hdmi|dsi>:pclk,h_active,...

Bug 969088

Change-Id: Id0acf608de145493f6749d5b799d4bbb8162ba72
Signed-off-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-on: http://git-master/r/104604
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
ARM: tegra: dvfs: Update Tegra3 dsi dvfs tables

Updated entries in Tegra3 dsi dvfs tables with recent characterization results.

Bug 985671.
Bug 1006163.

Change-Id: Ife87f3ccfd9d6147d4aa5b57c1a5750bbabc7e6b
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/112805
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Zu <pzu@nvidia.com>
modified for N7 kernel by faux123
cpufreq: mid-range frequency bias

Restrict go_maxspeed_load and max_boost at mid-range frequencies.

Change-Id: I9e3c59bbe708b428e12ce4dbef2144be09751d5a
Signed-off-by: satya popuri <spopuri@nvidia.com>
Reviewed-on: http://git-master/r/111754
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Karthikeyan Samynathan <ksamynathan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
adapted for Nexus Grouper kernel from NV reference by faux123
cpufreq: interactive: add duration to boostpulse

baseded on:
From: Narayanan Gopalakrishnan <nargop@codeaurora.org>
Date: Thu, 4 Oct 2012 03:09:29 -0500
Subject: [PATCH] cpufreq: interactive: add boostpulse duration

This makes up for the portions missing that would've been written
by Narayanan Gopalakrishnan but they were missing (duration, and boost
time) and also adds the ability to set duration (which was originally
created by cyanogen)

Change-Id: I50ab2340080a1a21d051925300737058ed4a622d
lowmemorykiller: Compact memory when killing processes

* Memory compaction is never invoked on Android because we avoid swap
   and don't allocate huge pages. Fix it by invoking compaction from the LMK when
   a process is killed to reduce memory fragmentation.

Change-Id: I2bda790c2093e65fd6f43d52ea5149d6b57cb1e9

Conflicts:

	drivers/staging/android/lowmemorykiller.c

Conflicts:
	drivers/staging/android/lowmemorykiller.c
lowmemorykiller: Use asynchronous compaction

Change-Id: I6a65d06fc30b88fcedaaf1abf1855fdd19e3c912
drivers: staging: android: lmk compile fixup

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
lowmemorykiller: fix compile warning

Change-Id: If7965053444f8a6ee1b0e000642ffc89926f2655
cpufreq: interactive: remove input_boost handling

Now handled in userspace Power HAL instead.

Change-Id: I78a4a2fd471308bfcd785bbefcc65fede27314cf
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
config: grouper: set interactive as default

Change-Id: I23929d78e7840cf805269f04a70b332a0253f025
cpufreq: interactive: remove depreciated go_maxspeed_load

this /should/ have been replaced by go_hispeed_load
also rename midrange_maxspeed to midrange_hispeed for clarity

Change-Id: I50f9d91b85808b5ce81963cb6af67163faece832
cpufreq: interactive: run at fraction of hispeed_freq when load is low

When load is below go_hispeed_load, apply the percentage of CPU load to
a max frequency of hispeed_freq instead of the max speed.  This avoids
jumping too quickly to hispeed_freq when it is a relatively low
percentage of max speed.  This also allows go_hispeed_load to be set to
a high percentage relative to hispeed_freq (as a percentage of max speed,
again useful when hispeed_freq is a low fraction of max speed), to cap
larger loads at hispeed_freq.  For example, a load of 60% will typically
move to 60% of hispeed_freq, not 60% of max speed.  This causes the
governor to apply two different speed caps, depending on whether load is
below or above go_hispeed_load.

Also fix the type of hispeed_freq, which was u64, to match other
speed data types (and avoid overhead and allow division).

Change-Id: Ie2d0668be161c074aaad77db2037505431457b3a
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
cpufreq: interactive: always limit initial speed bump to hispeed

First bump speed up to hispeed_freq whenever the current speed is below
hispeed_freq, instead of only when the current speed is the minimum speed.
The previous code made it too difficult to use hispeed_freq as a common
intermediate speed on systems that frequently run at speeds between
minimum and hispeed_freq.

Change-Id: I04ec30bafabf5741e267ff289209b8c2d846824b
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
Revert "kernel:sys lets just assume this is a typo"

This reverts commit b48d4cbeccd24618c0309e95fc67a7f256bbd7b8.

patch caused shutdown with usb connected to reboot device,
into normal mode not chargemode

Change-Id: I0b137f2619759a3e2de0feb93540b8d5ce220b22
cpufreq: interactive: realign with mainline 3.4

per:
  f3ce554 cpufreq: interactive: run at fraction of hispeed_freq when load is low

bulk of what i wanted removed:
 2bb0abf cpufreq: Disable hotplug during UI interaction
  *leftover input boost stuff
 2f4cbf8 cpufreq interactive governor: Update target frequency calculation
 + several fixup commits
 5893efb cpufreq: mid-range frequency bias
  *nvidia ramp logic

the rest will be added back
full list:

reverted:
da26503 cpufreq: interactive: always limit initial speed bump to hispeed
4c47242 cpufreq: interactive: run at fraction of hispeed_freq when load is low
f7596b0 cpufreq: interactive: remove depreciated go_maxspeed_load
d58e1c8 cpufreq: interactive: remove input_boost handling
1d33ef5 cpufreq: interactive: add duration to boostpulse
5893efb cpufreq: mid-range frequency bias
8d2c34f cpufreq: interactive: add boost pulse interface
2f694c2 Revert "Revert "cpufreq: Disable hotplug during UI interaction""
a75df69 Revert "cpufreq: Disable hotplug during UI interaction"
2bb0abf cpufreq: Disable hotplug during UI interaction
fe713a4 cpufreq: Backport Android 3.0 interactive governor
ca757eb cpufreq: interactive: change timer rate
806fff6 cpufreq: set go_maxspeed_load to 85%
4e1ec69 cpufreq: update target freq always
c8c6328 cpufreq: Add a knob to treat IO wait as busy
5bfda21 cpufreq: change min_sample_time
55f60ec cpufreq interactive governor: Unify attribute store functions
041013a cpufreq interactive governor: Reduce permissions
fb38f41 cpufreq interactive governor: Made sysfs nodes writable
08580dd cpufreq interactive governor: Fix attribute write bug
2da5414 cpufreq interactive governor: add max_boost sysfs node
6b9c5a2 cpufreq interactive governor: Init idle times on governor start
2f4cbf8 cpufreq interactive governor: Update target frequency calculation
30524c4 Revert "cpufreq: interactive governor: apply intermediate load on curren
bba6bd9 Revert "cpufreq: interactive governor: scale to max only if at min speed
0d8cdc5 Revert "cpufreq: interactive governor: go to intermediate hi speed befor
d7d5c43 Revert "cpufreq: interactive governor: default 20ms timer"

squashed:
f3ce554 cpufreq: interactive: run at fraction of hispeed_freq when load is low
63c3cf9 cpufreq: interactive: always limit initial speed bump to hispeed
2ed8f64 cpufreq: interactive: remove input_boost handling
856cb1e cpufreq: interactive: handle speed up and down in the realtime task
56a8a75 cpufreq: interactive: keep freezer happy when not current governor
f6bebb6 cpufreq: interactive: take idle notifications only when active
5068ec9 cpufreq: interactive: restart above_hispeed_delay at each hispeed load
0ae3e67 cpufreq: interactive: add boost pulse interface
5fa0404 cpufreq: interactive: set floor for boosted speed
096b789 cpufreq: interactive: Add sysfs boost interface for hints from userspace
447c84d cpufreq: interactive: remove unused target_validate_time_in_idle
8091d5b cpufreq: interactive: Boost frequency on touchscreen input
c233b58 cpufreq: Separate speed target revalidate time and initial set time
9c7ccc1 cpufreq: interactive: based hispeed bump on target freq, not actual
e0cfd52 cpufreq: interactive: adjust code and documentation to match
4a41891 cpufreq: interactive: configurable delay before raising above hispeed
a9e5894 cpufreq: interactive: don't drop speed if recently at higher load
be68b3f cpufreq: interactive: set at least hispeed when above hispeed load
b467c8e cpufreq: interactive: apply intermediate load to max speed not current
7ddbc2a cpufreq interactive governor: event tracing

Change-Id: Ic186427aa0474811663a7dfba14acffe9ce6ae88
cpufreq: change min_sample_time

We prefer a min_sample_time of 30ms. This is tied to our cluster switch
and auto-hotplug artificial delays.

Signed-off-by: satya popuri <spopuri@nvidia.com>

original commit message:

cpufreq: reduce min_sample_time

Reduce the minimum amount of time the interactive governor spends at a
frequency before ramping down. This parameter (min_sample_time) was 80ms
now reduced to 30 ms based on perf and power sweep numbers.

Reviewed-on: http://git-master/r/86900 (cherry picked from commit
581f20a5b7b8c3e4ee2c211b28dbc81510af2ae7).
Signed-off-by: satya popuri <spopuri@nvidia.com>

Change-Id: I24f4cd52737950fd4e78a36b4ee34a84551e0e12
Reviewed-on: http://git-master/r/89217
Reviewed-by: Satya Popuri <spopuri@nvidia.com>
Tested-by: Satya Popuri <spopuri@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
cpufreq interactive governor: Init idle times on governor start

When governor starts initialize time_in_idle and idle_exit_time
variables with current data, and restart timer. This is required
to properly start governor on busy CPU that would not enter idle
state for a long time.

(cherry picked from commit 876dc6eddc68054e6abe23f6287cfbf5302a75b9)
(cherry picked from commit d0024f3ad1e4c6d4885355df3fda02435ccc471d)

Change-Id: I992ca9193cb95e64cc9ef8bfb86675b32ad6d43d
Reviewed-on: http://git-master/r/61712
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Ra79d9a3ca97b0cfd49fb642ba7cafb98c11c04f1

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c