The functions in log.h are already mostly documented, so add them to the
generated documentation.
Signed-off-by: Sean Anderson
Reviewed-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Add % before constants in kerneldocs
- Document log_level_t and log_category_t members
doc/develop/logging.rst | 5 ++
include/log.h | 142 +---
2 files changed, 95 insertions(+), 52 deletions(-)
diff --git a/doc/develop/logging.rst b/doc/develop/logging.rst
index 28340a4aac..52ccd2009e 100644
--- a/doc/develop/logging.rst
+++ b/doc/develop/logging.rst
@@ -291,3 +291,8 @@ information
Add a command to add new log records and delete existing records.
Provide additional log() functions - e.g. logc() to specify the category
+
+Logging API
+---
+.. kernel-doc:: include/log.h
+ :internal:
diff --git a/include/log.h b/include/log.h
index 7a839d55aa..952d407068 100644
--- a/include/log.h
+++ b/include/log.h
@@ -17,54 +17,88 @@
struct cmd_tbl;
-/** Log levels supported, ranging from most to least important */
+/**
+ * enum log_level_t - Log levels supported, ranging from most to least
important
+ */
enum log_level_t {
- LOGL_EMERG = 0, /* U-Boot is unstable */
- LOGL_ALERT, /* Action must be taken immediately */
- LOGL_CRIT, /* Critical conditions */
- LOGL_ERR, /* Error that prevents something from working */
- LOGL_WARNING, /* Warning may prevent optimial operation */
- LOGL_NOTICE,/* Normal but significant condition, printf() */
- LOGL_INFO, /* General information message */
- LOGL_DEBUG, /* Basic debug-level message */
- LOGL_DEBUG_CONTENT, /* Debug message showing full message content */
- LOGL_DEBUG_IO, /* Debug message showing hardware I/O access */
+ /** @LOGL_EMERG: U-Boot is unstable */
+ LOGL_EMERG = 0,
+ /** @LOGL_ALERT: Action must be taken immediately */
+ LOGL_ALERT,
+ /** @LOGL_CRIT: Critical conditions */
+ LOGL_CRIT,
+ /** @LOGL_ERR: Error that prevents something from working */
+ LOGL_ERR,
+ /** @LOGL_WARNING: Warning may prevent optimial operation */
+ LOGL_WARNING,
+ /** @LOGL_NOTICE: Normal but significant condition, printf() */
+ LOGL_NOTICE,
+ /** @LOGL_INFO: General information message */
+ LOGL_INFO,
+ /** @LOGL_DEBUG: Basic debug-level message */
+ LOGL_DEBUG,
+ /** @LOGL_DEBUG_CONTENT: Debug message showing full message content */
+ LOGL_DEBUG_CONTENT,
+ /** @LOGL_DEBUG_IO: Debug message showing hardware I/O access */
+ LOGL_DEBUG_IO,
+ /** @LOGL_COUNT: Total number of valid log levels */
LOGL_COUNT,
+ /** @LOGL_NONE: Used to indicate that there is no valid log level */
LOGL_NONE,
- LOGL_LEVEL_MASK = 0xf, /* Mask for valid log levels */
- LOGL_FORCE_DEBUG = 0x10, /* Mask to force output due to LOG_DEBUG */
+ /** @LOGL_LEVEL_MASK: Mask for valid log levels */
+ LOGL_LEVEL_MASK = 0xf,
+ /** @LOGL_FORCE_DEBUG: Mask to force output due to LOG_DEBUG */
+ LOGL_FORCE_DEBUG = 0x10,
+ /** @LOGL_FIRST: The first, most-important log level */
LOGL_FIRST = LOGL_EMERG,
+ /** @LOGL_MAX: The last, least-important log level */
LOGL_MAX = LOGL_DEBUG_IO,
};
/**
- * Log categories supported. Most of these correspond to uclasses (i.e.
- * enum uclass_id) but there are also some more generic categories.
+ * enum log_category_t - Log categories supported.
+ *
+ * Log categories between %LOGC_FIRST and %LOGC_NONE correspond to uclasses
+ * (i.e. uclass_id), but there are also some more generic categories.
*
* Remember to update log_cat_name[] after adding a new category.
*/
enum log_category_t {
+ /** @LOGC_FIRST: First log category */
LOGC_FIRST = 0, /* First part mirrors UCLASS_... */
+ /** @LOGC_NONE: Default log category */
LOGC_NONE = UCLASS_COUNT, /* First number is after all uclasses */
- LOGC_ARCH, /* Related to arch-specific code */
- LOGC_BOARD, /* Related to board-specific code */
- LOGC_CORE, /* Related to core features (non-driver-model) */
- LOGC_DM,/* Core driver-model */
- LOGC_DT,/* Device-tree */
- LOGC_EFI, /* EFI implementation */
- LOGC_ALLOC, /* Memory allocation */
- LOGC_SANDBOX, /* Related to the sandbox board */
- LOGC_BLOBLIST, /* Bloblist */
- LOGC_DEVRES,/* Device resources (devres_... functions) */
- /* Advanced Configuration and Power Interface (ACPI) */
+ /** @LOGC_ARCH: Related to arch-specific code */
+ LOGC_ARCH,
+ /** @LOGC_BOARD: Related to board-specific code */
+ LOGC_BOARD,
+ /** @LOGC_CORE: Related to core features (non-driver-model) */