media: video: tegra: tegra_camera: disable eack

 - Disable eack when a camera is in use

Bug 995950

Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/110224
(cherry picked from commit f336812516efac8c6445def282340333094973c9)

Change-Id: I9a5ee84dc48bacf88261b0bf3180fe69fea3712f
Reviewed-on: http://git-master/r/110979
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
ARM: tegra: emc: add reference counting to early ack disablement

Bug 995950

Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/110190
(cherry picked from commit cbfc31fb126cd651157125d1785135eced6587dd)

Change-Id: I44eb889235db82b0efda238b87be5612425afb9d
Reviewed-on: http://git-master/r/110978
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
scheduler: compute time-average nr_running per run-queue

Compute the time-average number of running tasks per run-queue for a
trailing window of a fixed time period. The detla add/sub to the
average value is weighted by the amount of time per nr_running value
relative to the total measurement period.

Change-Id: I076e24ff4ed65bed3b8dd8d2b279a503318071ff
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
(cherry picked from commit 3a12d7499cee352e8a46eaf700259ba3c733f0e3)
Reviewed-on: http://git-master/r/111635
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
proc: enhance time-average nr_running stats

Add time-average nr_running to loadavg printout

Bug 958978

Change-Id: I5c6904efb52a86f4964eb66c1576fc91f60f5b1d
Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 86f3642cc44a69d1e4798719bd9182cd6923f526)
Reviewed-on: http://git-master/r/111636
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
scheduler: Re-compute time-average nr_running on read

Re-compute time-average nr_running when it is read. This would
prevent reading stalled average value if there were no run-queue
changes for a long time. New average value is returned to the reader,
but not stored to avoid concurrent writes. Light-weight sequential
counter synchronization is used to assure data consistency for
re-computing average.

Change-Id: I8e4ea1b28ea00b3ddaf6ef7cdcd27866f87d360b
Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 527a759d9b40bf57958eb002edd2bb82014dab99)
Reviewed-on: http://git-master/r/111637
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
ARM: tegra: power: Use runnable threads average for hotplug

Sample scheduler runnable threads average in auto-hotplug work
function and use it to determine the auto-hotplug target for number
of on-line cores. Use cpu up delay as sampling period, and enforce
down delay by checking last cpu configuration change time stamp.

Bug 958978

Change-Id: I4280a11d39914687e6ffaa6f38df594d10aedaa9
Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit 507e2ef5e4f09b23de2e924003dba259d3c8bc3c)
Reviewed-on: http://git-master/r/111638
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
arm: tegra: hotplug: tune runnable thread params.

Tuned the runnable threads threshold from 5/9/13 to 5/9/10 in order to improve performance

Bug 958978

Change-Id: I77abcd0077845517f2b5f7487c547f8a5157c2c7
Signed-off-by: Wen Yi <wyi@nvidia.com>
(cherry picked from commit 25a97f57661353fbb5ee40faed296befbf635178)
Reviewed-on: http://git-master/r/111639
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
arm: tegra: hotplug: modify down_delay

Modified the hot-plug governor down_delay to be 500ms instead of 2s

Bug 958978

Change-Id: I55b5a4994f8e4564879cfd206fc683ff6f32d9ac
Signed-off-by: Wen Yi <wyi@nvidia.com>
(cherry picked from commit dd477396f2762f871255fb9d0800431d7534754d)
Reviewed-on: http://git-master/r/111640
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
arm: tegra: modify hotplug balance threshold

Tuned the sensitivity level of the hot-plug governor's balancing algorithm to 60% from 75%

Bug 958978

Change-Id: I972ed908995e348e8b3b0afb8108c44b66c80eae
Signed-off-by: Wen Yi <wyi@nvidia.com>
(cherry picked from commit 07a69db5af4c971b2c2d161ee149580ab5b40633)
Reviewed-on: http://git-master/r/111641
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Tested-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
ARM: config: Added tegra skin throttling option

Added Kconfig option to enable skin thermal throttling.

bug 1007726

Change-Id: I8f92172ffd44802f1662c327c02c8a61c523c408
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/105989
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
regulator: tps80031: support for min voltage tolerance

Sometimes the system allow to run in less than requested
minimum voltage and if this tolerance allow the regulator
to set voltage in lower side range than this saves the power.
For the example, if client request vmin = 975mV for regulator
voltage then it sets the voltage to 987.5mv as the nearest to this
desired value. The next lower side for the voltage is 974.8mv.
So if system runs on tolerance of 1mv and if it request for
975mv then driver can look for minimum voltage as 975 - tolerance(1)
= 974mv and possible configure 974.8mv rather than 987.5mV and so
it can save the power equivalent to 12.5mV higher voltage.

Support the configuration of tolerance value.

Change-Id: Ic8312bb397c2615a3ee0f84072ec394e513525ea
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/110523
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
spi: tegra: macro for enable/disable runtime pm inside driver

Add macro in the spi tegra driver for enabling/disabling
runtime PM specific to this driver.
Setting macro SPI_PM_RUNTIME_ENABLE to 1 will enable the
runtime pm and resetting to 0 make runtime pm disable.

The dynamic clock management i.e. enabling the clock before
transfer and disabling after transfer complete is done in
both the cases.
When runtime pm is enabled then clock control is done through
runtime pm callbacks otherwise it will be directly call the
clock control apis.

bug 1003103

Change-Id: I2544e8f3b3e5605e0247791653a5a0ed6c36e9b6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/112142
Reviewed-by: Automatic_Commit_Validation_User
video: backlight: use gpio request and free apis for backlight pin

- Gpio freeing function does disabling job.
- If backlight pin is an sfio, we have to claim the gpio. So that we can use
the gpio api's to configure it as sfio.

bug 984440
bug 858120

Change-Id: I583bf4a486d2d9a6d9b78ee459b1962379eafd3b
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/109564
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
gpu: ion: tegra: treat compilation warning as error

- enabling warning as error flag

bug 949219

Change-Id: I5f8acb0f67f42abb7edd62ad21a8a6498681935a
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/110769
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Revert "gpu: ion: tegra: treat compilation warning as error"

This reverts commit f898b5de6fc924808932bc4befc966e5af9f44b1.
gpu: ion: tegra: treat compilation warning as error

- enabling warning as error flag

bug 949219

Change-Id: I5f8acb0f67f42abb7edd62ad21a8a6498681935a
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/110769
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Revert "gpu: ion: tegra: treat compilation warning as error"

This reverts commit f898b5de6fc924808932bc4befc966e5af9f44b1.
cpuquiet: Updated balanced governor to use the runnable threads patch

The balanced governor now looks at the average number of runnable
threads when bringing cores online and offline. The balanced governor
parameters have also been updated to reflect a similar patch for
autohotplug.

Change-Id: I8dac26659ba43d95a68830c6cc268591a7f03f80
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/111282
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
regmap: add support for non contiguous status to regmap-irq

In some chips the IRQ status registers are not contiguous in the register
map but spaced at even spaces. This is an easy case to handle with minor
changes. It is assume for this purpose that the stride for status is
equal to the stride for mask/ack registers as well.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 022f926a2401c80ed36ebb48a1bffbac08f34d98)
Change-Id: I68a59c8fd8a67062dac0eceaefcc85ed597f4a29
Reviewed-on: http://git-master/r/111484
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
mfd: palmas PMIC device support

Palmas is a PMIC from Texas Instruments and this is the MFD part of the
driver for this chip. The PMIC has SMPS and LDO regulators, a general
purpose ADC, GPIO, USB OTG mode detection, watchdog and RTC features.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 2945fbc2fcd83df03165342c1bc3ab83d0fe9c04)
Change-Id: I0bdebbef55d91d2293806355dced43b4c2decad8
Reviewed-on: http://git-master/r/111485
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>