Commit 010f493d authored by Mario Limonciello's avatar Mario Limonciello Committed by Linus Walleij
Browse files

pinctrl: amd: Add fields for interrupt status and wake status



If the firmware has misconfigured a GPIO it may cause interrupt
status or wake status bits to be set and not asserted. Add these
to debug output to catch this case.

Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230328174231.8924-3-mario.limonciello@amd.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 75358cf3
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -211,6 +211,8 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
	char *wake_cntrl1;
	char *wake_cntrl2;
	char *pin_sts;
	char *interrupt_sts;
	char *wake_sts;
	char *pull_up_sel;
	char *orientation;
	char debounce_value[40];
@@ -274,7 +276,13 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
				else
					interrupt_mask = "😷";

				seq_printf(s, "%s|     %s|  %s|",
				if (pin_reg & BIT(INTERRUPT_STS_OFF))
					interrupt_sts = "🔥";
				else
					interrupt_sts = "  ";

				seq_printf(s, "%s %s|     %s|  %s|",
				   interrupt_sts,
				   interrupt_mask,
				   active_level,
				   level_trig);
@@ -305,6 +313,12 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
				wake_cntrlz = "  ";
			seq_printf(s, "%s|", wake_cntrlz);

			if (pin_reg & BIT(WAKE_STS_OFF))
				wake_sts = "🔥";
			else
				wake_sts = " ";
			seq_printf(s, "   %s|", wake_sts);

			if (pin_reg & BIT(PULL_UP_ENABLE_OFF)) {
				if (pin_reg & BIT(PULL_UP_SEL_OFF))
					pull_up_sel = "8k";