arm: tegra: p1852: Add i2s/tdm mode selection

Added code to select i2s vs tdm mode.
Added tdm-pcm-audio device defination.
Changed the pcm driver to use tdm-pcm-audio device.
Added fields to pass the pcm driver name to ASoC.
Added P1852_TDM config to KConfig and Linux defconfig

Bug 948478

Change-Id: I82fa03ab947cc615089e0a3107fb53901a1c00cd
Signed-off-by: Bob Johnston <bjohnston@nvidia.com>
Reviewed-on: http://git-master/r/105383
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: tegra: wake up cleanup

Duplicate functions for wakeup support removed.

bug 980993

Change-Id: I1e385a1adec6f2d64ce2c88a59e94d647a16569d
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/105901
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
regulator: Add support for RICOH PMIC RC5T583 regulator

The RC5T583 PMIC from RICOH consists of 4 DCDC and 10
LDOs. This driver supports the control of different
regulator output through regulator interface.
This driver depends on MFD driver of RC5T583 and uses
mfd rc5t583 apis to communicate to device for accessing
different device's registers.

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

Change-Id: If6bcc9c987fc97ff6f0c61e53de715cd84d0151b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105877
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
mfd: Fix modular builds of rc5t583 regulator support

The combination of commit 1b1247dd75aa5cf5fae54a3bec7280046e9c7957

    "mfd: Add support for RICOH PMIC RC5T583"

and commit 6ffc3270210efa2bea526953a142ffc908f5bd86

    "regulator: Add support for RICOH PMIC RC5T583 regulator"

are causing the i386 allmodconfig builds to fail with this:

  ERROR: "rc5t583_update" [drivers/regulator/rc5t583-regulator.ko] undefined!
  ERROR: "rc5t583_set_bits" [drivers/regulator/rc5t583-regulator.ko] undefined!
  ERROR: "rc5t583_clear_bits" [drivers/regulator/rc5t583-regulator.ko] undefined!
  ERROR: "rc5t583_read" [drivers/regulator/rc5t583-regulator.ko] undefined!

and this:

  ERROR: "rc5t583_ext_power_req_config" [drivers/regulator/rc5t583-regulator.ko] undefined!

For the 1st four, make the simple ops static inline, instead of
polluting the namespace with trivial exports.  For the last one,
add an EXPORT_SYMBOL.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit 82ea267f7dc853a5e6a724916a70a10656efdfc2)

Change-Id: I7f03cc5c0005883eb8355170cdc7996a9c392091
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105878
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
mfd: Add rc5t583's gpio in mfd device list

Adding the gpio of RC583 in the list of rc583 mfd devices
to register the gpio driver of RC5T583.

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

Change-Id: Iea2ccf7831c331d1ad08f96100d4222cce31224f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105879
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
mfd: Convert rc5t583 to devm_regmap_init_i2c()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
(cherry picked from commit f8dddc0cfe9f56ed74fd5efde8d0754f5fb73a3f)

Change-Id: I72d44f59c79abbbdac95398a5d4da2bedf19d8f1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105880
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
regulator: Fix rc5t583_regulator_probe error handling

1. regulator_register returns ERR_PTR on error, thus use IS_ERR to check the
   return value.
2. Fix off-by-one for unregistering the registered regulator.
   Current code does not unregister regs[0].rdev in clean_exit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman  Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit a69df8a14ae7b891ee22f0e4c081f3ff65c0640f)

Change-Id: Ib5e00e655020e313c73e5b838e62dbdea54c28d0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105881
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
regulator: rc5t583: Fix off-by-one valid range checking for selector

The valid selector should be 0 ... nsteps-1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 9cc7a453b637d8c1f628f9873204ff55d7aa664c)

Change-Id: Ie1a39883036de3b2945d35854e0a16c46d2a9db2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105882
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
regulator: rc5t583: Remove nsteps from struct rc5t583_regulator_info

The nsteps can be calculated by (_max_mv - _min_mv) * 1000 / _step_uV + 1,
thus we can remove _nsteps from RC5T583_REG macro, and then remove
nsteps from struct rc5t583_regulator_info.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit e3a7384c3e98c48b5f122e449e22cc8a1a6c7e0d)

Change-Id: If6db39255b2f7f8be38b848f2ca2619301b19b38
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105883
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
regulator: rc5t583: Correct MODULE LICENSE to GPL v2

Fixing build issue reported by Paul Gortmaker:

It appears this breaks linux-next allmodconfig build, because it
uses an uppercase V in the v2 of its MODULE_LICENSE.

FATAL: modpost: GPL-incompatible module rc5t583-regulator.ko uses
GPL-only symbol 'platform_driver_unregister'
make[2]: *** [__modpost] Error 1

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 4eb06453648bb0d1eca3669f26798a19b6f40eb8)

Change-Id: I8c715cf5a8e72555721a954d6db6879aed2eb423
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105884
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583

The PMIC device RC5T583 from RICOH supports 8 gpios.
Adding gpio driver for this device to access the pins
control through gpio library.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[grant.likely: slight cosmetic changes]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
(Cherry-picked from mainline
	e9fe32bcadb8a7a40411d77f168abd45941b049b)

Change-Id: Id11f0dec229a92ce0ddcf606376ff83b6e14ca90
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105885
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
ARM: tegra: config: Enable RICOH RC5T583 drivers

The RICOH RC5T583 drivers are back ported to downstream from
mainline. Enabling this driver.

Change-Id: I1c956e622aebb705d860e5b50df5a1c82c5d57c3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/105886
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
crypto: tegra-se: Use sg_next to get next sg

Use sg_next to get next sg

Bug 958431

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>

Change-Id: I14aa7c9c551d0230b9c5b681a2699dd5355d0a6d
Reviewed-on: http://git-master/r/98449
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@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>
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