ARM: tegra: Fix missing functions in gpio header

Fix the missing tegra_gpio enable/disable function defitintions.

Change-Id: I82ed085bd67486d5e9c383a8c26243e2c1edf670
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
Reviewed-on: http://git-master/r/140026
Reviewed-by: Automatic_Commit_Validation_User
ARM: tegra: fix-up definition by adding 'static'

Fix up the definition of the tegra_gpio enable/disable.

Change-Id: Id71242690efa3e5994a4b70089826f2b87997ece
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
Reviewed-on: http://git-master/r/140036
Reviewed-by: Automatic_Commit_Validation_User
ARM: tegra: fix-up tegra_gpio enable/diablse defs

Clean-up the definition of the tegra_gpio enable/disable so that
it compares to the l4t r16 rel.

Change-Id: Ia8584ada1e2a728d2784d6d57c72ed4b0ee01cf1
Signed-off-by: Matt Pedro <mapedro@nvidia.com>
Reviewed-on: http://git-master/r/140648
Reviewed-by: Automatic_Commit_Validation_User
video: tegra: fb: Configure dc from fb

This patch contains following changes:
1. Modify tegra_fb_update_monspecs to select best mode to apply
   on framebuffer, in HDMI hotplug.
2. Add a console_lock to prevent corruption while fbcon running
   in multiple threads.
3. Add a tegra_dc_disable/enable in tegra_fb_set_par to reflect
   the programmed new mode applied on DC.

Bug: 1005399
Change-Id: I133b38b00f25f767afc05549550fecde8d092fb2
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/120932
(cherry picked from commit ec7552ef36c0d0979cb31db6d2d4bd54e7f1c9fb)
Reviewed-on: http://git-master/r/140031
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: cardhu: Reserve 16MB on RAM for HDMI

Reserve 16MB for HDMI maximum possible resolution (1920x1080) at
32 bpp and double buffering.

Change-Id: Id719a875b805723758485f970ab9e2f1a28ed19b
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/121562
(cherry picked from commit d376bc491a460353124adc0f2be8612add0d8e76)
Reviewed-on: http://git-master/r/140032
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: fb: Apply new mode even if its current

Set activation of a mode forcefully via setting FB_ACTIVATE_FORCE
flag. Required for stereo modes also.

Bug 1005399
Change-Id: I37872cc2a04abc8774a5f9f9df7d9e90f2c977f6
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/122087
(cherry picked from commit 80a7b7b2d10a97427e12884d469a518cc2b5f765)
Reviewed-on: http://git-master/r/140033
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
net: wireless: bcmdhd: cleanup Kconfig/Make

cleanup bcmdhd driver Kconfig and Makefile

Bug 1029792
Bug 1029733

Change-Id: Ic947644d2159a52fab7aea1621e12e51d8ee6332
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/141627
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
bcmdhd: do not turn off mmc at probe

Do not turn off mmc at probe if watchdog thread is
in use.

Bug 1029792
Bug 1029733

Change-Id: Ia2e303daa27688c96e7fa5941e01cf821166c498
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/141628
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
bcmdhd: use the wiphy from private data structure (i.e., wl_priv)

problem:
The macro wiphy_from_scan retrieves wiphy from
wl_priv->escan_info.wiphy which is in turn set by
a 'scan' initiated from kernel space (like
scheduled scan) or from user space (like iwlist command).
Without a scan, a 'connect' crashes in function
wl_inform_single_bss, with NULL pointer access,
as the variable wiphy (in turn, wl->escan_info.wiphy)
is not initialized properly.

solution:
wireless_device data structures maintained for both
STA and P2P mode point to the same wiphy (see,
wl_cfgp2p_register_ndev in wl_cfgp2p.c). So,
irrespective of whatever wireless_device is in
use, a scan will always set wl_priv->escan_info.wiphy
to the same wiphy. There is no point in getting
wiphy using wl_priv->escan_info.wiphy, rather use
the wiphy referred by all wireless_device structures.

Bug 1029792
Bug 1029733

Change-Id: I6d744950d3a053642ffa998b3c3f3ba60c0cb687
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/141629
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
config: use CFG80211 for bcmdhd

CFG80211 is needed for WFD. So, use CFG80211,
instead of, WEXT in bcmdhd driver.

Bug 1029792
Bug 1029733

Change-Id: I81d99a821429f3be8400355faa5bee14904c0944
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/141630
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
enabling P2P for bcmdhd driver

Bug 1029792

Change-Id: I8ee7190ccd50863f6f0f1aa216035afbae57ebcf
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/141631
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
asoc: tegra: WAR: Check AVP id before setting DMA

WAR to check souncard data's avp_id before trying to set
DMA address. An invalid avp_id can cause invlaid rtd, causing
panic in control ioctl calls.

Bug 1046249
Bug 1044761
Bug 1049940
Bug 1050152

Change-Id: Ib536220fdb92f8256c777d6fa14b66e47bc6b7be
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/134426
(cherry picked from commit 007fd7b1ae101c5be2a3d35ad11e7190862c04ca)
Reviewed-on: http://git-master/r/142493
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
ARM: tegra: ventana: disable usb1 vbus gpio

disable the usb1 vbus gpio in kernel and not depend on bootloader
to disable the vbus initially.
Currently, the kernel enables and disables the vbus when
the otg is configured to host mode, but when the system boots
with no cable connected the kernel relies on the bootloader
to turn the vbus off.
This CL removes that dependency.

Bug 1047048
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/#change,141970
(cherry picked from commit c3461995dd156968d766ec05879fd1097221ceb8)
Change-Id: I96c1f4b97a2cafdfd498b591647200d26298a43b
Reviewed-on: http://git-master/r/142839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
ARM: tegra: rename fuse driver

The fuse driver registers parameters and thus
create a /sys/module/fuse directory which collides
with the fuse filesystem driver.

Rename fuse.c to tegra-fuse.c to fix this.

Bug 1058350

Change-Id: I5201bc43fcb44df8181085322bc40d1f6e99bf93
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/143206
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Warren <swarren@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arm : tegra2 : do not power off the phy in suspend

Since there is no PMC available in tegra2
we will not be able to get any remote wakeup events. Hence do not
power of the phy during usb suspend.

Bug 1166740

Change-Id: I882066a283af2e574b111da3472eb3f8f8a9d6eb
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/160593
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
arm: tegra: fb: Update fix line_length

Update framebuffer's fix line_length parameter when changing
video mode dynamically.The new line_length should be according
to new x resolution. On addition, check the return value from
dc driver while setting a mode.

Bug 1163682
Bug 1056767
Bug 1056782
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Change-Id: Ib0ab48474f0af3235556a7f7f0d8354af3b50994
Reviewed-on: http://git-master/r/147511
(cherry picked from commit 5856c4afde9459ba6afaf2cdcb07361d9fbf8c79)
Reviewed-on: http://git-master/r/160788
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
arm: tegra: cardhu: add support for PM315

Add support for PM315

Bug 1171138

Change-Id: I2e5461c656c41d4172aca60525655cb780eaa17e
Original-author: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/143506
(cherry picked from commit 4e66142b6990ca586e085aa88ae0bd6b819da0c4)
Reviewed-on: http://git-master/r/166814
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arm: tegra: ahci/sata: check sata against board id

If the board has sata support, then only add platform device
Also move slumber code to Idle powergate section to
avoid build failure.

Bug 1171138

Change-Id: I6128f451f348a7fad41fc52579b18939c8a2efcd
Original-author: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/143984
Tested-by: Simone Willett <swillett@nvidia.com>
(cherry picked from commit 6e6a0ec500a3113272a593e4466f04d940bc637f)
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/166837
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arm: tegra: config: enable SATA for L4T

Enable CONFIG_SATA_AHCI_TEGRA

Bug 1171138

Change-Id: Id0cf3679a0fb0b85e20cd83c94135bf2aab2dd71
Original-author: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/143985
Tested-by: Simone Willett <swillett@nvidia.com>
(cherry picked from commit 6830e27f86e0f3a2f1e3bad51ee2bf6855dc99b7)
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/166838
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
config: tegra3: enable RFKILL_GPIO

required for bluetooth

Bug 1033671

Change-Id: Ibc45eaf344ef7a5eea88e7df5747f8dcdcbf202d
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/166347
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>