ARM: tegra: harmony: Update pm_power_off registration

Opt into the tps6586x registering the pm_power_off handler instead of
doing it ourselves.

Change-Id: I7859530c0c88de860c617a1a185f9cf6e8f046c5
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83602
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
ARM: tegra: kai: Update pm_power_off registration

Opt in to the max77663 registering the pm_power_off handler instead of
doing it ourselves.

Change-Id: Ic3efbce21e12337a3f435fbc257950fb977628a0
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83603
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: tegra: p852: Update pm_power_off registration

Opt into the tps6586x registering the pm_power_off handler instead of
doing it ourselves.

Change-Id: Ia722505aa3ee6eba8dd5ebe7769d784045d76ec4
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83604
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
ARM: tegra: cardhu: Use machine_is_cardhu()

We don't need a static bool here, there's already a function that does
this.

Change-Id: I7e5f13fc706b44f87ee7032860b31a8d8f622f21
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83624
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: tegra: kai: Use machine_is_kai()

We don't need a static bool here, there's already a function that does
this.

Change-Id: I63e02db770d617c5566af5a3f153b34660b689b0
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83625
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: tegra: enterprise: Use machine_is_tegra_enterprise()

We don't need a static bool here, there's already a function that does
this.

Change-Id: Icacf9dc2fccf2fc780cd7d37121f3eeedbe7fb40
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83623
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Revert "video: tegra: host: use runtime pm for clock management"

This reverts commit 961c60fe7213d92793d6072abc16f58721a33fed

Change-Id: I8ef0fbaee30e94c78b8df609f729953fee6d1583
Reviewed-on: http://git-master/r/84135
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
power: max17048: exit driver when battery is not detected

Exit max17048 driver when battery is not detected on KAI
platform.

Change-Id: I2d98f0a7635c6adc047c58040170b9e37e95b1ef
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/80074
Reviewed-by: Liangchuan Mi <lmi@nvidia.com>
Tested-by: Liangchuan Mi <lmi@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
asoc: tegra: ALC5640 machine:Add BT Sco support

Changes made to add support of BT Sco for kai.

Bug 936626

Change-Id: If01fe20ed94cc5634b581554b668c744fd822fc3
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/83072
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
asoc: tegra: ALC5640 machine: Enable cdc_en regulator

Add support for cdc_en regulator on kai.

Bug 928574

Change-Id: I11590cbd5b7fc91238bde3c7dbe72736117d4457
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/83485
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: fbmon: correct an improper error handling in fb_edid_add_monspecs()

There could be an EDID which does not contain any or valid "detailed
timing description".

bug 929621
bug 929632

Change-Id: Ib2ade57537e0dbb2263e9b7b1b91432a799743a7
Signed-off-by: Haley Teng <hteng@nvidia.com>
Change-Id: I7139db34c3e2102a2bf08f0ef153cd3f71ddc5d1
Reviewed-on: http://git-master/r/83687
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
regulator: max77663: add support for VDD_RTC tracking to VDD_CORE

Bug 920845

Change-Id: Id84218efaeebcc834fdac6e0e5c30adc60a13ebc
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/83727
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Liangchuan Mi <lmi@nvidia.com>
Tested-by: Liangchuan Mi <lmi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
arm: tegra: kai: enable VDD_RTC voltage tracking to VDD_CORE

With this feature enabled, VDD_RTC voltage can track to VDD_CORE
while VDD_CORE voltage is higher than the default voltage of VDD_RTC,
which is set to 1.0V here. When VDD_CORE is turned of in LP0, VDD_RTC
keeps its default value 1.0V.

Bug 920845

Change-Id: Ie62859df0d533745ff25cc0d19f8209f86938cec
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/83729
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
arm: tegra: kai: Specify PLLD2 as backup clock source

Since not all possible PLLP output rates (216MHz, 408MHz or 204MHz)
can provide accurate enough pixel clock rate for kai panel, use
PLLD2 as backup clock source.

Bug 928260

Change-Id: I2f268a1551611a9170e86cbdc44a5302edabc9f0
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Signed-off-by: Hao Tang <htang@nvidia.com>
Reviewed-on: http://git-master/r/83738
Reviewed-by: Liangchuan Mi <lmi@nvidia.com>
Tested-by: Liangchuan Mi <lmi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
arm: tegra: kai: set default_enable in tegra_ehci_platform_data

set default_enable in tegra_ehci_platform_data for kai since CONFIG_USB_HOTPLUG
has been replaced to tegra_ehci_platform_data

BUG 923705

Change-Id: If51cd8a25658bc86b23d6c6758d3283e5b4bd03a
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/83766
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: tegra: dsi: Soft reset if dsi host busy

If dsi host is unexpectedly busy, soft resetting
will restore controller state.

Bug 930453

Change-Id: I1bbce55d0b27a2be80a66218978e73c616e9d894
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/83986
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
media: video: tegra: Set EMC rate to max when VDE is enabled

Do not set EMC rate to minimum when module other than VDE is
enabled. This reverts the max rate set when VDE was enabled
if VDE is still enabled.

Bug 930230

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
(cherry picked from commit 692291955e650c87b7cf6ecac03df2ef0445609d)

Change-Id: Ief0e1d6116f064ba09b17ba01c7df0dc7905e0a0
Reviewed-on: http://git-master/r/84057
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
gpio: tps65910: Add sleep control support

The device tps65910/tps65911 supports the sleep
functionality in some of gpios. If gpio is configured
in output mode and sleep is enabled then during device
sleep state, the output of gpio becomes LOW regardless
of non-sleep output value.
Such gpio can be used to control regulator switch such
that output of regulator is off in device sleep state.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Cherry-picked from mainline commit:
	ccd68fff6b86b93a2d69caf4679c0ba4ca6dbc53

Resolve merge conflicts.

Change-Id: Ib424499821fde2ae916ae3792e980eab7dbdae4a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/79788
asoc: codecs: Add Suspend/Resume support for ALC5640

- Added suspend/resume support for ALC5640
- Fix for I2S1 interface

Bug 936013

Change-Id: I60b0eb224e9475b722ecb9e2fb8bf0a6dae12767
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/83058
Reviewed-by: Johnny Qiu <joqiu@nvidia.com>
Tested-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
asoc: rt5639: Write the right device id

The value of reset register of ALC5639 is 0x0008
instead of 0x000c.

bug 931371

Change-Id: I5fbf31411ddab2358d61f998f74a7b1f8c151312
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/83318
Reviewed-by: Chandler Zhang <chazhang@nvidia.com>
Tested-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>