media: platform: tegra: ov5693: fix sysedp registration

Register sysedp consumer with actual device name, not with generic
'ov5693' name. This allows more than one device to exists in the
system.

Bug 200007892
Bug 200021368

Change-Id: I2c85f3d1f483afb75df2b16a4d5808fdd8f3d9ad
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/415014
(cherry picked from commit d0a2342b78cb93ac858932cb2973f87a33417830)
Reviewed-on: http://git-master/r/438112
Reviewed-by: Steve Rogers <srogers@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
HID: hidraw: check disconnect before get raw report

Bug 200021849

Change-Id: I4096a25b251a351eeae627a776683adfec7dd197
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/439070
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
staging: ozwpan: Cancel hrtimer before expiry set

Currently oz_timer_add sets the new expiry time before calling
hrtimer_start_expires where the timer is actually updated in the
timerqueue.

However, this update to expiry time is racy because the the
hrtimer_set_expires call is being performed from a softirq or a thread's
context. The CPU could recieve a hrtimer_interrupt before the
hrtimer_start_expires call but after hrtimer_set_expires.

This would leave the hrtimer with a new expiry value but with the same
position in the rbtree which a subsequent hrtimer_interrupt could use
to perform its timerqueue add/del operations with. Leaving the rbtree
in this stale/bad state causes some timers to never get serviced.

Fix this by first removing the timer from the timerqueue by calling
hrtimer_cancel and then updating the expiry time.

Bug 200016188

Change-Id: Ib8acb9f2977580e077bbe968a32c6deba992d000
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/439729
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
bcmdhd: wait for cfg cleanup before unregistering

If the p2p device is unregistered before the cfg
cleanup work item is scheduled then, the wdev
struct is corrupted and can cause the kernel panic.
wait for the work item to finish before freeing

Bug 1533639

Change-Id: Ib8729a985d2ed14ec062f98a9a8bcebacf90f8fc
Signed-off-by: bibhayr <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/439979
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
ARM: Tegra: TN8: Correct vana mapping

The i2c address of the rear camera sensor has changed

Bug 200016507

Change-Id: I9d6794b2efe81c96286d4ca305731492f9062961
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/438554
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
staging: iio: light: iqs263: synchronize driver

-support iqs263 read/write.

Change-Id: I47c36978037af6fabedd01b319b1645ce73d095e
Signed-off-by: Shylender Gaddamwar <sgaddamwar@nvidia.com>
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/435874
(cherry picked from commit ae243d22c899302bba08990598c3c0a13ade0d7b)
Reviewed-on: http://git-master/r/440489
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
ov5693: fix fuse ID read

Add 150us delay to start of fuse ID read to ensure sensor is ready
to communicate.

Bug 200005241

Change-Id: Ie9be9f22419e3c16952bde44ce1e289f48b7bba2
Signed-off-by: Philip Breczinski <pbreczinski@nvidia.com>
Reviewed-on: http://git-master/r/447834
(cherry picked from commit df3e4528e5b2f8f96a658c8b865db1e077105d3d)
Reviewed-on: http://git-master/r/448948
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Schalig <dschalig@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
video: tegra: host: Register VI isomgr on request

Register VI as isomgr client when the camera user
driver has requested for memory BW requirements.
Currently it is being done in probe only, which
may be unnecessary for the usecases where VI is
not the memory client.

Bug 1485474

Change-Id: I9ae41e299bf0a8ef21ed94d44a57829cf70d11e2
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
(cherry picked from commit 279b41ca6155d3e6b17c09a9418a6e1bbdc57889)
Reviewed-on: http://git-master/r/449588
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
bcmdhd: ensure work completion before freeing

Problem description:
 - wl_dealloc_netinfo would free allocated wireless_dev structures, which has
   work_struct for wdev_cleanup_work
 - If there is any job scheduled for wdev_cleanup_work and if it
   is scheduled after kfree of its parent struct, the result is undefined
 - But simply waiting for wdev_cleanup_work completion in
   wl_cfg80211_netdev_notifier_call would result in a dead lock, as wdev_cleanup_work
   and cfg80211_event_work both use the same workqueue. cfg80211_event_work
   may ultimately call wl_cfg80211_netdev_notifier_call

Fix description:
 - Separate the detach of an interface from the deallocation of an interface
 - Upon a detach, only remove the interface, and schedule a deallocation of it

Bug 1533639

Change-Id: I865907243ac370ab5932fb1d5ec7ce8c83279baf
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/448637
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
bcmdhd: null check for wl->p2p

Bug 200024287
Change-Id: Ideb514aeb37250431a6fc4c064c95fbdbe498936
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/448019
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
bcmdhd: update cfg layer with active channel list

Update the cfg layer with active channel list after
associating to AP. Currently cfg layer gets updated
only during driver initialization. If some other
channel is passive during that time, it will never
get updated to active. Also, this update should be
done after every scan, but this should take care of
at least to update the AP association channel to be
active so that the p2p GO can be created on the APs
channel. Cfg layer does not check the passive channel
list for wlan0 connection but it checks the passive
channel for p2p GO creations.

Bug 200015567
BuG 200020740

Change-Id: Id42836917ca60aff0ae3a2115d7ee90ba017ee9f
Signed-off-by: bibhayr <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/436981
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
drivers: clocksource: add CPU PM notifier for ARM architected timer

Few control settings done in architected timer as part of initialisation
can be lost when CPU enters deeper power states. They need to be
restored when the CPU is (warm)reset again.

This patch adds CPU PM notifiers to save the counter control register
when entering low power modes and restore it when CPU exits low power.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Change-Id: I0bad683961e4b72835ad40edf2c9ac9e0f78fad0
Reviewed-on: http://git-master/r/350844
(cherry picked from commit 1dd60414e4839c11eb99dbbd071b8accdaa3dafd)
Reviewed-on: http://git-master/r/453553
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
ARM: arch_timer: Enable PL0 access to the CNTVCT

Enable usermode access to the generic virtual counter.

Change-Id: Id033d12690d1693e67cf75ce7017fd4a24a18b45
Signed-off-by: Neil Gabriel <ngabriel@nvidia.com>
Reviewed-on: http://git-master/r/422391
(cherry picked from commit 49e21cf475a62c2c6c38f6b2460579834ad62b6b)
Reviewed-on: http://git-master/r/453554
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
asoc: tegra: sync regcache across suspend-resume

- I2S registers and regcahe lose sync across suspend-resume
- Mark regcache dirty in suspend
- Sync regcache with i2s registers in resume

Bug 200008638

Change-Id: I4b603047f48fa771bd84a5481039760bf433cf35
Signed-off-by: vmali <vmali@nvidia.com>
Reviewed-on: http://git-master/r/453473
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
Reviewed-by: Rene Houle <rhoule@nvidia.com>
Tested-by: Rene Houle <rhoule@nvidia.com>
GVS: Gerrit_Virtual_Submit
power: lc709203f:report raw battery soc to framework

do not limit soc to 99 when fuel gauge is reporting
battery soc 100%, if battery reached DONE state with BQ
charger chip done interrupt and cable is disconnected after that,
sudden drop in battery soc is observed.

Change-Id: I9fa47541f791cf9b44fe257e26fa681b8e3dd8a5
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/450372
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
power: lc709203f:report actual FG read value when BC reports charging done

do not set Battery SOC to 100% when FG reports less than 100% and Battery
charger trigger charging done.

Change-Id: I0a1c70ed4ad0745b4ca074450e52389f6f655b31
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/450986
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
net:wireless:bcmdhd: set rpt_hitxrate

Set the rpt_hitxrate to 1 so that link speed updated by WLC_GET_RATE
is the maximum transmit rate
rpt_hitxrate 0 : Here the rate reported is the most used rate in the
		link.
rpt_hitxrate 1 : Here the rate reported is the highest used rate in the
		link.
Otherwise linkspeed updated in the GUI is 802.11 NULL frame data rate
which is 24 Mbps.

Bug 200027022

Change-Id: I0c69b635d0b68c06f38297f39070cc5da04e478b
Signed-off-by: Raghu <kraghavender@nvidia.com>
Reviewed-on: http://git-master/r/455067
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
misc: tegra-profiler: unwinding: use RCU locking

Unwinding: use RCU locking instead of spinlocks to protect
map of regions.

Bug 1502205

Change-Id: If1089b74b1f317eeaae5059de40d7a3365ae4061
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/397599
(cherry picked from commit 3504dc62f0aad25ad5c50f46c6c3319b95775966)
Reviewed-on: http://git-master/r/454437
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
tegra-profiler: add access to the exception tables

Tegra Profiler: add access to the exception tables via mmap areas.
Do not read directly from the user space.

Bug 200002243

Change-Id: I442daaecb11fd4416b3e485722efdf34234e0241
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/405671
(cherry picked from commit eb721f5af416f14aacf5589c4403c7b6a0b0b5fb)
Reviewed-on: http://git-master/r/454440
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
misc: tegra-profiler: fix resource leaks

Fix Coverity issue of resource leaks
Coverity id : 26481
Coverity id : 26483

Bug 1416640

Change-Id: Ib71950f196b5421ccbc21b3ac8d620e790e83366
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/411421
(cherry picked from commit 4449c4508c2619f2e21c2965c97605d69284ab0c)
Reviewed-on: http://git-master/r/454441
Reviewed-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>