提交 a88520bf 编写于 作者: J Jim Lin 提交者: Greg Kroah-Hartman

usb: gadget: tegra: Reduce pad power

Program USB2 UTMI pad PD controls during port connect/disconnect.
Power down pad after disconnected to save power.
Signed-off-by: NJim Lin <jilin@nvidia.com>
Link: https://lore.kernel.org/r/20220816082353.13390-3-jilin@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 77bfa0fc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
* NVIDIA Tegra XUSB device mode controller * NVIDIA Tegra XUSB device mode controller
* *
* Copyright (c) 2013-2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2013-2022, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2015, Google Inc. * Copyright (c) 2015, Google Inc.
*/ */
...@@ -702,6 +702,8 @@ static void tegra_xudc_device_mode_on(struct tegra_xudc *xudc) ...@@ -702,6 +702,8 @@ static void tegra_xudc_device_mode_on(struct tegra_xudc *xudc)
pm_runtime_get_sync(xudc->dev); pm_runtime_get_sync(xudc->dev);
tegra_phy_xusb_utmi_pad_power_on(xudc->curr_utmi_phy);
err = phy_power_on(xudc->curr_utmi_phy); err = phy_power_on(xudc->curr_utmi_phy);
if (err < 0) if (err < 0)
dev_err(xudc->dev, "UTMI power on failed: %d\n", err); dev_err(xudc->dev, "UTMI power on failed: %d\n", err);
...@@ -756,6 +758,8 @@ static void tegra_xudc_device_mode_off(struct tegra_xudc *xudc) ...@@ -756,6 +758,8 @@ static void tegra_xudc_device_mode_off(struct tegra_xudc *xudc)
/* Make sure interrupt handler has completed before powergating. */ /* Make sure interrupt handler has completed before powergating. */
synchronize_irq(xudc->irq); synchronize_irq(xudc->irq);
tegra_phy_xusb_utmi_pad_power_down(xudc->curr_utmi_phy);
err = phy_power_off(xudc->curr_utmi_phy); err = phy_power_off(xudc->curr_utmi_phy);
if (err < 0) if (err < 0)
dev_err(xudc->dev, "UTMI PHY power off failed: %d\n", err); dev_err(xudc->dev, "UTMI PHY power off failed: %d\n", err);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册