From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/5] reset_source: inline document global.system.reset*
Date: Mon, 15 Dec 2025 08:58:59 +0100 [thread overview]
Message-ID: <20251215075907.1222551-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20251215075907.1222551-1-a.fatoum@pengutronix.de>
global.system.reset is documented in the reset reason chapter in the
docs, but not for runtime use. global.system.reset_instance is not
documented at all.
Provide a description text for both.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/reset_source.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/common/reset_source.c b/common/reset_source.c
index bd1efe073664..77a75a490347 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -9,6 +9,7 @@
#include <environment.h>
#include <globalvar.h>
#include <reset_source.h>
+#include <magicvar.h>
static const char * const reset_src_names[] = {
[RESET_UKWN] = "unknown",
@@ -93,3 +94,6 @@ static int reset_source_init(void)
return 0;
}
coredevice_initcall(reset_source_init);
+
+BAREBOX_MAGICVAR(global.system.reset, "The reason for the last system reset")
+BAREBOX_MAGICVAR(global.system.reset_instance, "The reset reason instance number")
--
2.47.3
next prev parent reply other threads:[~2025-12-15 7:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 7:58 [PATCH 1/5] net: 9p: fix variable name in BAREBOX_MAGICVAR Ahmad Fatoum
2025-12-15 7:58 ` [PATCH 2/5] bootchooser: inline document global.bootchooser.reset_priorities Ahmad Fatoum
2025-12-15 7:58 ` Ahmad Fatoum [this message]
2025-12-15 7:59 ` [PATCH 4/5] Documentation: generate docs for magic variables Ahmad Fatoum
2025-12-15 7:59 ` [PATCH 5/5] Documentation: turn magic variables literals into references Ahmad Fatoum
2025-12-15 11:17 ` [PATCH 1/5] net: 9p: fix variable name in BAREBOX_MAGICVAR Sascha Hauer
2025-12-15 12:17 ` Ahmad Fatoum
2025-12-15 12:23 ` Sascha Hauer
2025-12-15 12:25 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251215075907.1222551-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox