[PATCH 02/14] usb: dwc2: Add descriptive debug messages for Partial Power Down mode.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Added dev_dbg() messages when entering and exiting from
partial power down. It is now more visible when core
enters partial power down and when exits form it.

Debug messages are added in the following functions.
- dwc2_exit_partial_power_down()
- dwc2_enter_partial_power_down()

Signed-off-by: Artur Petrosyan <arturp@xxxxxxxxxxxx>
---
 drivers/usb/dwc2/core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 55d5ae2a7ec7..fb471d18a3de 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -141,6 +141,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore)
 	if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL)
 		return -ENOTSUPP;
 
+	dev_dbg(hsotg->dev, "Exiting of Partial Power Down started.\n");
+
 	pcgcctl = dwc2_readl(hsotg, PCGCTL);
 	pcgcctl &= ~PCGCTL_STOPPCLK;
 	dwc2_writel(hsotg, pcgcctl, PCGCTL);
@@ -178,6 +180,8 @@ int dwc2_exit_partial_power_down(struct dwc2_hsotg *hsotg, bool restore)
 		}
 	}
 
+	dev_dbg(hsotg->dev, "Exit Partial Power Down completes here.\n");
+
 	return ret;
 }
 
@@ -194,6 +198,8 @@ int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg)
 	if (!hsotg->params.power_down)
 		return -ENOTSUPP;
 
+	dev_dbg(hsotg->dev, "Start of Partial Power Down completed\n");
+
 	/* Backup all registers */
 	ret = dwc2_backup_global_registers(hsotg);
 	if (ret) {
@@ -238,6 +244,8 @@ int dwc2_enter_partial_power_down(struct dwc2_hsotg *hsotg)
 	pcgcctl |= PCGCTL_STOPPCLK;
 	dwc2_writel(hsotg, pcgcctl, PCGCTL);
 
+	dev_dbg(hsotg->dev, "Partial Power Down completed\n");
+
 	return ret;
 }
 
-- 
2.11.0





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux