]> www.infradead.org Git - users/jedix/linux-maple.git/commit
phy: tegra: xusb: Add sleepwalk and suspend/resume
authorJC Kuo <jckuo@nvidia.com>
Wed, 20 Jan 2021 07:34:06 +0000 (15:34 +0800)
committerThierry Reding <treding@nvidia.com>
Thu, 1 Apr 2021 07:48:52 +0000 (09:48 +0200)
commitb8bb3d9c9b74cb2c3a9d5a230d8715cf9de07b8e
tree8a71030b4228ed7d98bf594b48da9c6c7397864e
parent0b7f6fb80827ad327ae28a384d7a642ca43e2b09
phy: tegra: xusb: Add sleepwalk and suspend/resume

This commit adds sleepwalk/wake and suspend/resume interfaces
to Tegra XUSB PHY driver.

Tegra XUSB host controller driver makes use of sleepwalk functions
to enable/disable sleepwalk circuit which is in always-on partition
and can respond to USB resume signals when controller is not powered.
Sleepwalk can be enabled/disabled for any USB UPHY individually.

  - tegra_xusb_padctl_enable_phy_sleepwalk()
  - tegra_xusb_padctl_disable_phy_sleepwalk()

Tegra XUSB host controller driver makes use of wake functions to
enable/disable/query wake circuit which is in always-on partition
can wake system up when USB resume happens.
Wake circuit can be enabled/disabled for any USB PHY individually.

  - tegra_xusb_padctl_enable_phy_wake()
  - tegra_xusb_padctl_disable_phy_wake()
  - tegra_xusb_padctl_remote_wake_detected()

This commit also adds two system suspend stubs that can be used to
save and restore XUSB PADCTL context during system suspend and
resume.
  - tegra_xusb_padctl_suspend_noirq()
  - tegra_xusb_padctl_resume_noirq()

Signed-off-by: JC Kuo <jckuo@nvidia.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/phy/tegra/xusb.c
drivers/phy/tegra/xusb.h
include/linux/phy/tegra/xusb.h