On Tue, Jan 19, 2021 at 04:55:45PM +0800, JC Kuo wrote: > This commit unlinks xhci-tegra platform device with SS/host power > domain devices. Reasons for this change is - at ELPG entry, PHY > sleepwalk and wake configuration need to be done before powering > down SS/host partitions, and PHY need be powered off after powering > down SS/host partitions. Sequence looks like roughly below: > > tegra_xusb_enter_elpg() -> xhci_suspend() > -> enable PHY sleepwalk and wake if needed > -> power down SS/host partitions > -> power down PHY > > If SS/host power domains are linked to xhci-tegra platform device, we > are not able to perform the sequence like above. > > This commit introduces: > 1. tegra_xusb_unpowergate_partitions() to power up SS and host > partitions together. If SS/host power domain devices are > available, it invokes pm_runtime_get_sync() to request power > driver to power up partitions; If power domain devices are not > available, tegra_powergate_sequence_power_up() will be used to > power up partitions. > > 2. tegra_xusb_powergate_partitions() to power down SS and host > partitions together. If SS/host power domain devices are > available, it invokes pm_runtime_put_sync() to request power > driver to power down partitions; If power domain devices are not > available, tegra_powergate_power_off() will be used to power down > partitions. > > Signed-off-by: JC Kuo <jckuo@xxxxxxxxxx> Acked-by: Thierry Reding <treding@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature