mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mfd: pca9450: print reset reason as hex if unknown
@ 2024-05-02 10:17 Ahmad Fatoum
  2024-05-03  6:54 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-05-02 10:17 UTC (permalink / raw)
  To: barebox; +Cc: has, bst, Ahmad Fatoum

On an i.MX93-based board, it was observed that a potential ELE-induced
reset ended up with an unknown reset reason. To aid in debugging this,
print the value in hexadecimal when no mapping is known.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mfd/pca9450.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/pca9450.c b/drivers/mfd/pca9450.c
index 8fa5363f8a60..be357c10239f 100644
--- a/drivers/mfd/pca9450.c
+++ b/drivers/mfd/pca9450.c
@@ -52,7 +52,7 @@ static int pca9450_get_reset_source(struct device *dev, struct regmap *map)
 		type = RESET_EXT;
 		break;
 	default:
-		dev_warn(dev, "Could not determine reset reason.\n");
+		dev_warn(dev, "Unknown reset reason: 0x%02x\n", reg);
 		type = RESET_UKWN;
 	}
 
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-03  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 10:17 [PATCH] mfd: pca9450: print reset reason as hex if unknown Ahmad Fatoum
2024-05-03  6:54 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox