mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/6] Common: define scopes a specific hardware or software feature can cope with
Date: Mon, 22 Jun 2015 12:33:19 +0200	[thread overview]
Message-ID: <1434969204-11433-2-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1434969204-11433-1-git-send-email-jbe@pengutronix.de>

This change adds an enum to define a scope to be used in frameworks which
have to select a feature specific to a scope. These defines will be used
in the following changes in the 'reset reason', 'machine restart' and
'watchdog' framework. These three frameworks need this kind of information
to select a proper feature provider or source.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 include/fscope.h | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 include/fscope.h

diff --git a/include/fscope.h b/include/fscope.h
new file mode 100644
index 0000000..186249b
--- /dev/null
+++ b/include/fscope.h
@@ -0,0 +1,29 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __INCLUDE_FSCOPE_H
+# define __INCLUDE_FSCOPE_H
+
+/* define a scope some hardware feature can cope with */
+enum f_scope {
+	FEATURE_SCOPE_UNKNOWN,
+	FEATURE_SCOPE_CPU,
+	FEATURE_SCOPE_SOC,
+	FEATURE_SCOPE_MACHINE,
+};
+
+#define NAME_FEATURE_SCOPE_UNKNOWN "unknown"
+#define NAME_FEATURE_SCOPE_CPU "cpu"
+#define NAME_FEATURE_SCOPE_SOC "soc"
+#define NAME_FEATURE_SCOPE_MACHINE "machine"
+
+#endif /* __INCLUDE_FSCOPE_H */
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-06-22 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 10:33 [PATCH] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage" Juergen Borleis
2015-06-22 10:33 ` Juergen Borleis [this message]
2015-06-22 10:33 ` [PATCH 2/6] Reset reason: add a scope value to the reset reason feature Juergen Borleis
2015-06-22 10:33 ` [PATCH 3/6] System restart: add a scope value to the system restart feature Juergen Borleis
2015-06-24 18:34   ` Sascha Hauer
2015-06-25  7:06     ` Juergen Borleis
2015-06-22 10:33 ` [PATCH 4/6] Watchdog: add a scope value to the watchdog feature Juergen Borleis
2015-06-22 10:33 ` [PATCH 5/6] Watchdog/i.MX: make the watchdog driver a regular driver Juergen Borleis
2015-06-22 10:33 ` [PATCH 6/6] MFD/DA9053: da9053: add basic da9053 driver Juergen Borleis

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=1434969204-11433-2-git-send-email-jbe@pengutronix.de \
    --to=jbe@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