pinctrl: amd: Use pm_pr_dbg to show debugging messages
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 2 Jun 2023 07:30:24 +0000 (02:30 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Jun 2023 17:56:09 +0000 (19:56 +0200)
To make the GPIO tracking around suspend easier for end users to
use, link it with pm_debug_messages.  This will make discovering
sources of spurious GPIOs around suspend easier.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pinctrl/pinctrl-amd.c

index f279b36..43d3530 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/pinctrl/pinconf.h>
 #include <linux/pinctrl/pinconf-generic.h>
 #include <linux/pinctrl/pinmux.h>
+#include <linux/suspend.h>
 
 #include "core.h"
 #include "pinctrl-utils.h"
@@ -636,9 +637,8 @@ static bool do_amd_gpio_irq_handler(int irq, void *dev_id)
                        regval = readl(regs + i);
 
                        if (regval & PIN_IRQ_PENDING)
-                               dev_dbg(&gpio_dev->pdev->dev,
-                                       "GPIO %d is active: 0x%x",
-                                       irqnr + i, regval);
+                               pm_pr_dbg("GPIO %d is active: 0x%x",
+                                         irqnr + i, regval);
 
                        /* caused wake on resume context for shared IRQ */
                        if (irq < 0 && (regval & BIT(WAKE_STS_OFF)))