tegra: video: remove LGD 7" T4 in some condition

This is work around. LGD WXGA 7" panel spec requests
1s delay between "panel 3v3 off" and "3v3 on" if all
panel related power rails (1v8, 3v3) are not turned off.

Precondition for work around
 - In power off, panel off then touch off.
 - In power on, touch on then panel on.

Why work around is necessary?
 - Same 1v8 rail is shared by touch and panel.
   In panel off, 3v3 rail off and 1v8 rail off
   are requested, but 1v8 rail isn't turned off
   in panel off timeframe because of touch module.
   It is possible to get panel on request without
   touch off/on control. In this case, 1S delay
   is necessary per spec. If 1v8 is turned off
   and on by touch module before panel on request,
   then, we don't need 1S delay. If 1v8 is turned
   off in panel on request time, we don't need
   1S delay, either.

Bug 1349306

Change-Id: I204b4c1a73aeff2fcd29e00a818e409a85c8a6e9
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/270026
(cherry picked from commit 5bbcc6a090796220590838ddbcd03b61afe000e4)
Reviewed-on: http://git-master/r/302785
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
tegra: video: LGD 7" T5 and T6 delay fix.

Based on the spec, LGD 7" T5 needs to be >200ms
and T6 needs to be >200ms. A part of delay is
already handled in mipi command sequence, so remove
duplicated delay value.

Bug 1349306

Change-Id: Iad1f2d2785d5f78e91a8eb61a51f1349ededc40a
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/278755
(cherry picked from commit 274964e74207e629499496a93f636d3930ccacea)
Reviewed-on: http://git-master/r/302786
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
media:video:tegra: ov5693 add 2560x1440 HDR mode

Bug 1384211

Change-Id: I35b255b118499fa868d00ff421a916f5d281eafb
Signed-off-by: Joshua Widen <jwiden@nvidia.com>
(cherry picked from commit e04f69a1a895a2af72639f6089c26d4b1a3b3652)
Reviewed-on: http://git-master/r/303779
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Karl Kim <kkim@nvidia.com>
Reviewed-by: Harry Hong <hhong@nvidia.com>
video: tegra: Remove delay if power is enabled

When first boot, vdd_lcd_bl_en is already enabled.
vdd_lcd_bl_en doesn't share power rail, we can remove 200ms delay.

Bug 1367030

Change-Id: I4f9d4900c59a858ae34224cba42791f36363851c
Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com>
Reviewed-on: http://git-master/r/273602
(cherry picked from commit 4fb2530fb5817ec9a752af5490eb01ba378e1a2a)
Reviewed-on: http://git-master/r/304689
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
mmc: sdhci: Increase SW timeout for sanitize cmd

Sanitize cmds have very long busy wait times. Increasing the SW timeout
timer for sanitize cmd to ensure that the driver doesn't trigger
timeout in the middle of sanitize busy wait.

Bug 1385731
Bug 1392724

Change-Id: Ibb73b27159508b2ae851032a6ea1432f76b1f384
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/303361
(cherry picked from commit 86455fb1b1e9416b192fe8e8e37212da9a242ccb)
Reviewed-on: http://git-master/r/304792
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
arm: tegra: tegratab: add tegra wakeup monitor support

Add the paltform data of tegra wakeup monitor to enable it.

Bug 1394338
Bug 1185135

Change-Id: I2d4aba9095958f1ba56b13ef7b46963a0bfa746e
Signed-off-by: Jiukai Ma <jiukaim@nvidia.com>
Reviewed-on: http://git-master/r/243329
(cherry picked from commit 4b0abf7d70ef13c829e2d16d0777d5ceae9188c4)
Reviewed-on: http://git-master/r/304737
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
android-alarm: find the rtc wakeup offender

if device is waken up by RTC chip, then set a flag in the return value
of alarm_ioctl.

Bug 1190908

Change-Id: I7b3f40b004848707fc76916e75eb69976eef5c38
Signed-off-by: Louis Li <louli@nvidia.com>
Reviewed-on: http://git-master/r/191885
(cherry picked from commit 9c9b62ac1bd2a0acccda9a2c7e88c4495bcca4e0)
Reviewed-on: http://git-master/r/253331
(cherry picked from commit 176826f9b0fcabcb7d12f3d01e52f61cbea8e862)
Reviewed-on: http://git-master/r/309383
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jiukai Ma <jiukaim@nvidia.com>
Tested-by: Jiukai Ma <jiukaim@nvidia.com>
Reviewed-by: Harry Hong <hhong@nvidia.com>
arm: tegra: wakeup offender monitoring

Find the wakeup offender when the device is waken up by wireless or rtc
alarm. And record how many times the offenders cause the device to wake
up separately.

Bug 1190908

Change-Id: Ic8608448ce84d5c109e3957e0d98c3fcf088989c
Signed-off-by: Louis Li <louli@nvidia.com>
Reviewed-on: http://git-master/r/189852
(cherry picked from commit c7f18168a1a0c7cdb5ed87883c9cc337e6b15b7a)
Reviewed-on: http://git-master/r/253330
(cherry picked from commit 0feff897e7caf2a5833cffa163b7164e7da1c061)
Reviewed-on: http://git-master/r/309382
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
misc:  ti-st: Send timeout error if ST registration fails

Send timeout error in case of ST registration failure so that
that ST retries.

Bug 1347583

Change-Id: Ie64d17203aa03e7efa126d243c01e9017008a7f3
Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com>
Reviewed-on: http://git-master/r/263940
(cherry picked from commit a3cbaaba6faef8abb2b45b5362f70f1ec9dc3136)
Reviewed-on: http://git-master/r/304677
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
misc: ti-st: Create rx_list before all channels are registered

rx_list should be created before the channels are registered else
when the chip sends data after registering channel 4 we may
encounter a crash.

Bug 1390113

Change-Id: Ieb1e0bbeda7845a156ee6636f233c79df36ba7db
Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com>
Reviewed-on: http://git-master/r/304774
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
media: video: tegra: ov5693 change the setting value

When the change to AOHDR, FOV is shifted. The y offset value of sensor
is different in both non-aohdr and aohdr mode. change the y offset value.

Bug 1381607

Change-Id: I2b496940f355af91d90361b60c38e20d76caf40a
Signed-off-by: Karl Kim <kkim@nvidia.com>
Reviewed-on: http://git-master/r/302268
(cherry picked from commit 81d89595edc544eef5dd1be11f386e1c244ba0a0)
Reviewed-on: http://git-master/r/309880
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
media:video:tegra: ov7695 new tuning value.

Exposure error for 25 lux fails to pass NVIQ. applying new
tuning value.

Bug 1321963

Change-Id: Ib2eeb17178e7a10c7c005facfab9089e199a1845
Signed-off-by: Karl Kim <kkim@nvidia.com>
Reviewed-on: http://git-master/r/303142
(cherry picked from commit f6799b9d7726907b6ead6f36faa12d222a4f3c0a)
Reviewed-on: http://git-master/r/323974
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alvin Park <apark@nvidia.com>
Reviewed-by: Harry Hong <hhong@nvidia.com>
media:video:tegra: ov5693 fuse ID support

Add fuse ID read support for the ov5693 from OTP Bank 0

Bug 1399569

Change-Id: I27b934556c3e21a4c85c1a65952a4f8e08bc1ab5
Signed-off-by: Karl Kim <kkim@nvidia.com>
Reviewed-on: http://git-master/r/323825
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
input: touch: maxim_sti: dvdd_on init val change

In change I204b4c1a73aeff2fcd29e00a818e409a85c8a6e9,
there's precondition to apply workaround to reduce
LGD T4 delay, but we don't need to obey this precondition
in device power on, since there's no power rail off.
This can be accomplished by setting touch_dvdd_on
initial state to true.

Bug 1367030

Change-Id: I2a7f5ba9d740afd02aa034898e226b610b662f62
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/325949
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyong Bin Kim <hyongbink@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
ARM: tegratab: config: disable IKCONFIG_PROC

Per CTS 4.3 requirement, IKCONFIG_PROC leaks kernel configuration via
/proc/config.gz, disable this option for security concern.

Bug 1343930
Bug 1398204

Change-Id: I4d20fb6075fb67c6d7897f11317c1ba8a8bd1b13
Signed-off-by: Harry Hong <hhong@nvidia.com>
Reviewed-on: http://git-master/r/326358
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yuki Kinebuchi <ykinebuchi@nvidia.com>
RM: tegratab: config: re-enable IKCONFIG_PROC

Bug 1398204

Change-Id: I3f75a8290515c4fa5b1034f530d3dc84f454ba57
Signed-off-by: Harry Hong <hhong@nvidia.com>
Reviewed-on: http://git-master/r/326964
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alvin Park <apark@nvidia.com>
Reviewed-by: Peter Kim <pekim@nvidia.com>
Tested-by: Peter Kim <pekim@nvidia.com>
cpufreq: interactive: check freq with policy->cur

Added check for new target freq with policy->cur before request new
target freq.
This change is derived from http://git-master/r/#/c/298964/ for
stability issues.

Bug 1397658.

Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/309571
(cherry picked from commit 665c49bfcf55cdce2987b9e7abe4c2f1eb1207e3)

Change-Id: Id263e2c9988873e41ebe95dfcf52dab9d24ddcad
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/326907
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
Revert "input: touch: maxim_sti: Check thread stop condition"

This reverts commit 62c978972b14446f49433e08552cd14972369013.

We don't need to check thread stop condition on latested maxim release.

Conflicts:

	drivers/input/touchscreen/maxim_sti.c

Change-Id: Ib6322cae36d82f510c4e1b45491f53ada1e6aebc
Signed-off-by: Bo Kim <bok@nvidia.com>
Reviewed-on: http://git-master/r/298915
(cherry picked from commit ad5b947fe112517e3cfbe77f00f5cad66bd794cd)
Reviewed-on: http://git-master/r/327436
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
Revert "input: touch: maxim_sti: Shutdown safely"

This reverts commit 87de1d533241169695c552e837f024208d98c670.

The latest maxim release processes shutdown as well.

Conflicts:

	drivers/input/touchscreen/maxim_sti.c

Change-Id: Ic6b506c873a98413bc5bb51dd2d2e79019177622
Signed-off-by: Bo Kim <bok@nvidia.com>
Reviewed-on: http://git-master/r/298916
(cherry picked from commit 52d61d13335287dba7e4b37406ba2b62eb05caf4)
Reviewed-on: http://git-master/r/327437
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
Revert "input: touch: maxim_sti: boot fusion from init"

This reverts commit 06eef70f3568f781da609570d0dfb39c3a869439.

Change-Id: I13caedd3d9e0519af496d83a81785ccd28117b10
Signed-off-by: Bo Kim <bok@nvidia.com>
Reviewed-on: http://git-master/r/298853
(cherry picked from commit c835182402f2b3cd2345a4c9b193b08d18639fde)
Reviewed-on: http://git-master/r/327438
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>