mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0
@ 2024-05-03 10:15 Ahmad Fatoum
  2024-05-06  6:23 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-05-03 10:15 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The register is zeroed on read, so network booting always prints the
warning that the reset reason is unknown.

Skip the warning in this case.

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

diff --git a/drivers/mfd/pca9450.c b/drivers/mfd/pca9450.c
index be357c10239f..89eca9f890e3 100644
--- a/drivers/mfd/pca9450.c
+++ b/drivers/mfd/pca9450.c
@@ -53,6 +53,8 @@ static int pca9450_get_reset_source(struct device *dev, struct regmap *map)
 		break;
 	default:
 		dev_warn(dev, "Unknown reset reason: 0x%02x\n", reg);
+		fallthrough;
+	case 0:
 		type = RESET_UKWN;
 	}
 
-- 
2.39.2




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

* Re: [PATCH] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0
  2024-05-03 10:15 [PATCH] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0 Ahmad Fatoum
@ 2024-05-06  6:23 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-05-06  6:23 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Fri, 03 May 2024 12:15:19 +0200, Ahmad Fatoum wrote:
> The register is zeroed on read, so network booting always prints the
> warning that the reset reason is unknown.
> 
> Skip the warning in this case.
> 
> 

Applied, thanks!

[1/1] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0
      https://git.pengutronix.de/cgit/barebox/commit/?id=20acc8c050f6 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03 10:15 [PATCH] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0 Ahmad Fatoum
2024-05-06  6:23 ` Sascha Hauer

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