arm: tegra: resolve compilation time warnings

Bug 949219

Change-Id: I91a67d30869e9800c483f112d58b9f76e2dbe361
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/103534
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: defconfig: Remove SYSRQ support.

Due to noise on serial port , we get unwanted SYSRQ events.

Bug 978676

Signed-off-by: Gaurav Sarode <gsarode@nvidia.com>
Change-Id: Ida73f6817c2365b74c7237ae97a9fc006674c34c
Reviewed-on: http://git-master/r/103786
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
net: wireless: sd8797: Fix (re)association issue

Fix the issue -
When device connects to 2GHz AP, it does not scan
APs in 5GHz and vice-versa.

Bug 968022

Change-Id: I5dfddf4e73260cb1e03bd3d28c029503507cd898
Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-on: http://git-master/r/104482
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
arm: tegra: enable 1.8 volts through ocr_mask for sdio

sdio supports 1.8 volts, setting 1.8 volts for
cardhu, kai, ventana, whistler

Bug 979504

Change-Id: I8f03b01e0792ac0e6abe74ce898934e65762fb85
Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/104712
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
asoc: tegra: p1852: Use pcm-driver from platform

Use the pcm-driver specified from platform/board
specified file.

Bug 991926

Change-Id: I9e4c9a3f76bacb22de817273a2281ac9b8959c43
Signed-off-by: Nitin Pai <npai@nvidia.com>
Reviewed-on: http://git-master/r/105415
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bob Johnston <bjohnston@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
regulator: tps62360: support force PWM mode via regulator mode

Change the mechanism of enabling the force PWM mode through
regulator set mode. This can be dynamically configured now.
In the REGULATOR_MODE_FAST the force PWM is enabled and in
REGULATOR_MODE_NORMAL the force PWM is disabled.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cherry-picked from mainline commit 9a00630

Change-Id: I39a77dbe5d0c4c2a5b81dbfe51163a65894bc98c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105832
Reviewed-by: Automatic_Commit_Validation_User
video: tegra: host: Remove error case panics

Remove BUG_ON()s in error cases:
* If IOCTL size is too large, return error instead
* If sync point id is out of range, return error. Prevents panics in
  sanity checks nvhost_cdma.

Bug 993642

Change-Id: I3cfa7a23dc557c811e20b726885f82666437de7f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105866
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
usb: otg: tegra: using sscanf in enable_host store functionality

Replaced kstrtoul with sscanf.

Change-Id: I1c82e92bf43d2ceba6ac3a7c0090394ba3497f13
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-on: http://git-master/r/105888
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
mfd: Use correct variable name for tps65910 regmap config

This was the copy-paste issue in reg cache support code where
variable name for regmap config was not really starting from
the device name, it was starting from some other device name.
Fixing this so that variable name contains actual device name.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 39ecb0376508b5cd20a951388d10aed2d719a77f)

Change-Id: Ife11f77952d847ae7918f11cf1e936bf5008feb4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105918
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Add support for tps65910 device sleep

Adding support for device sleep through the external input control
signal "SLEEP".
Changing the SLEEP signal state can switch the device into SLEEP and
ACTIVE state.
Also adding sleep configuration for different resources so that they
should be keep on during sleep state of device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(Cherry-picked from mainline
	201cf052810d20814a77ca0e0045a2c1a3508a1f)

Change-Id: Iec18bfcc7a1df6442e833dccaa1d39407918f710
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105920
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Fix tps65910 section annotations

A warning was being generated by the reference from tps65910_i2c_probe()
to tps65910_sleepinit() since the latter was annotated as __init but the
former was unannotated. Since these functions can only be called during
device init make them both __devinit, and while we're at it also annotate
tps65910_i2c_remove() __devexit for symmetry.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 63745d4068de8ccea3580214c6dbfdca0ec37859)

Change-Id: I9e85e31e770c7ea68524d046b87036d6d0264523
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105921
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Commonize tps65910 regmap access through header

This change removes the read/write callback functions in favor of common
regmap accessors inside the header file. This change also makes use of
regmap_read/write for single register access which maps better onto what this
driver actually needs.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(Cherry-pick from mainline
	3f7e82759c692df473675ed06fb90b20f1f225c3)

Change-Id: Ida79b196acf65ed14ff9fd2cc1f7c0048f99ba2b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105922
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
GVS: Gerrit_Virtual_Submit
mfd: Add tps65910 device-tree support

Add device tree based initialization support for TI's tps65910 pmic.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit cd4209ced4d3936cfe51b7b8833260457e2d9995)

Change-Id: I6f211ebcee135fd0c52662f296eee9f47f801e7a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105923
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Cache tps65910 register when we need it

During regmap initialization, we do not provide the default value and
hence in place of caching register during regmap_init(), cache it
when actually we need it i.e. after reading of that register.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 3bf6bf9be51a0195c6b1604454fdd28ed1cc1770)

Change-Id: I151f52436162a328b8d683fc06beba0587d6bda3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105924
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Convert all tps65910 allocation to devm_*

Convert memory allocation and regmap initialization to
use devm_* functions.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 63fe7dee9183118716078a9f2503f5f805d37c12)

Change-Id: I9b21c63031afffd1d9d1a37abf80895824f7fc7b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105925
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Register tps65910 gpios as an mfd device

As gpio support for tps65910 is on gpio driver, registering
gpio support as the mfd sub devices instead of calling gpio_init()
from the core probe.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 32df986e985921386b75b4bd1117102bf65fe095)

Change-Id: I631596313528ab192d7d8c2f376965ccc989c313
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105926
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
mfd: Fix tps65910 build failure

The tps65910_parse_dt() prototype for !CONFIG_OF was not correct, leading to:

drivers/mfd/tps65910.c: In function ‘tps65910_i2c_probe’:
drivers/mfd/tps65910.c:218:3: error: too many arguments to function ‘tps65910_parse_dt’

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 7f65f74ccee15f6eb0009921a428e3c5d5d06ae0)

Change-Id: I1592020268c408effc331069b7ae241c6da248bb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105927
GVS: Gerrit_Virtual_Submit
gpio: Convert tps65910 to a platform driver

Make the gpio-tps65910 as platform driver and register
this from tps65910 core driver as mfd sub device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 10bbc48d7a045c022a54f637c0c6b72f0e38b519)

Change-Id: Ib9419107acdaaa95052cc0fbe2efffb22c85e68d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105928
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
OF: Add of_match_ptr() macro

Add a macro of_match_ptr() that allows the .of_match_table
entry in the driver structures to be assigned without having
an #ifdef xxx NULL for the case that OF is not enabled

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
(cherry picked from commit 3a1e362e3f3cd571b3974b8d44b8e358ec7a098c)

Change-Id: Ib0365629efb6f203f8d87b487f66f99417e71bb3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105929
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
video: tegra: nvmap: Use config option NVMAP_CACHE_MAINT_BY_SET_WAYS

Change-Id: I762929a0d72a0b26aa1451a946993f4a57806fd4
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/104292
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Hiro Sugawara <hsugawara@nvidia.com>
GVS: Gerrit_Virtual_Submit