Index: uspace/app/tmon/burst_tests.c
===================================================================
--- uspace/app/tmon/burst_tests.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/burst_tests.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -47,10 +47,15 @@
 #define INDENT "      "
 
+/** Generic burst test parameters. */
 typedef struct tmon_burst_test_params {
-	tmon_test_params_t base; /* inheritance */
+	/** Inherited base. */
+	tmon_test_params_t base;
+	/** The count of reads/writes to perform. */
 	uint32_t cycles;
+	/** Size of single read/write. */
 	size_t size;
 } tmon_burst_test_params_t;
 
+/** Static array of long options, from which test parameters are parsed. */
 static struct option long_options[] = {
 	{"cycles", required_argument, NULL, 'n'},
@@ -59,6 +64,14 @@
 };
 
+/** String of short options, from which test parameters are parsed. */
 static const char *short_options = "n:s:";
 
+/** Common option parser for all burst tests.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ * @param[out] params Parsed test parameters (if successful).
+ *
+ * @return EOK if successful (in such case caller becomes the owner of `params`).
+ */
 static int read_params(int argc, char *argv[], tmon_test_params_t **params)
 {
@@ -105,9 +118,13 @@
 }
 
+/** Unit of quantity used for pretty formatting. */
 typedef struct tmon_unit {
+	/** Prefix letter, which is printed before the actual unit. */
 	char prefix;
+	/** Factor of the unit. */
 	uint64_t factor;
 } tmon_unit_t;
 
+/** Static array of units with decreasing factors. */
 static const tmon_unit_t units[] = {
 	{ .prefix = 'E', .factor = 1ul << 60 },
@@ -119,6 +136,13 @@
 };
 
+/** Format size in bytes for human reading.
+ * @param[in] size The size to format.
+ * @param[in] fmt Format string. Must include one double and char.
+ *
+ * @return Heap-allocated string if successful (caller becomes its owner), NULL otherwise.
+ */
 static char * format_size(double size, const char *fmt)
 {
+	// Figure out the "tightest" unit.
 	unsigned i;
 	for (i = 0; i < ARRAY_SIZE(units); ++i) {
@@ -135,4 +159,5 @@
 	}
 
+	// Format the size.
 	const double div_size = size / factor;
 	char *out = NULL;
@@ -142,4 +167,7 @@
 }
 
+/** Print burst test parameters.
+ * @param[in] params Test parameters to print.
+ */
 static void print_params(const tmon_burst_test_params_t *params)
 {
@@ -151,4 +179,8 @@
 }
 
+/** Print burst test results.
+ * @param[in] params Test parameters.
+ * @param[in] duration Duration of the burst test.
+ */
 static void print_results(const tmon_burst_test_params_t *params, usbdiag_dur_t duration)
 {
@@ -169,4 +201,10 @@
 }
 
+/** Run "interrupt in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_intr_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -187,4 +225,10 @@
 }
 
+/** Run "interrupt out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_intr_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -205,4 +249,10 @@
 }
 
+/** Run "bulk in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_bulk_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -223,4 +273,10 @@
 }
 
+/** Run "bulk out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_bulk_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -241,4 +297,10 @@
 }
 
+/** Run "isochronous in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_isoch_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -259,4 +321,10 @@
 }
 
+/** Run "isochronous out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_isoch_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -277,4 +345,10 @@
 }
 
+/** Interrupt in burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_intr_in(int argc, char *argv[])
 {
@@ -287,4 +361,10 @@
 }
 
+/** Interrupt out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_intr_out(int argc, char *argv[])
 {
@@ -297,4 +377,10 @@
 }
 
+/** Interrupt bulk burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_bulk_in(int argc, char *argv[])
 {
@@ -307,4 +393,10 @@
 }
 
+/** Bulk out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_bulk_out(int argc, char *argv[])
 {
@@ -317,4 +409,10 @@
 }
 
+/** Isochronous in burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_isoch_in(int argc, char *argv[])
 {
@@ -327,4 +425,10 @@
 }
 
+/** Isochronous out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_isoch_out(int argc, char *argv[])
 {
Index: uspace/app/tmon/commands.h
===================================================================
--- uspace/app/tmon/commands.h	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/commands.h	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -37,4 +37,7 @@
 #define TMON_COMMANDS_H_
 
+/* All commands are just versions of int main(int, char **). */
+
+/* List command just prints compatible devices. */
 int tmon_list(int, char **);
 
Index: uspace/app/tmon/list.c
===================================================================
--- uspace/app/tmon/list.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/list.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -44,4 +44,7 @@
 #define MAX_PATH_LENGTH 1024
 
+/** Print a single item of the device list.
+ * @param[in] svc Service ID of the devman function.
+ */
 static void print_list_item(service_id_t svc)
 {
@@ -63,4 +66,10 @@
 }
 
+/** List command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_list(int argc, char *argv[])
 {
Index: uspace/app/tmon/main.c
===================================================================
--- uspace/app/tmon/main.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/main.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -42,10 +42,15 @@
 #define INDENT "      "
 
+/** Command which is executed by tmon. */
 typedef struct tmon_cmd {
+	/** Unique name, by which the command is executed. */
 	const char *name;
+	/** Description of the command, which is displayed in the usage string. */
 	const char *description;
+	/** Function, which executes the command. Same as int main(int, char**). */
 	int (*action)(int, char **);
 } tmon_cmd_t;
 
+/** Static array of commands supported by tmon. */
 static tmon_cmd_t commands[] = {
 	{
@@ -86,10 +91,15 @@
 };
 
+/** Option shown in the usage string. */
 typedef struct tmon_opt {
+	/** Long name of the option without "--" prefix. */
 	const char *long_name;
+	/** Short name of the option without "-" prefix. */
 	char short_name;
+	/** Description of the option displayed in the usage string. */
 	const char *description;
 } tmon_opt_t;
 
+/** Static array of options displayed in the tmon usage string. */
 static tmon_opt_t options[] = {
 	{
@@ -105,4 +115,7 @@
 };
 
+/** Print usage string.
+ * @param[in] app_name Name to print in the invocation example.
+ */
 static void print_usage(char *app_name)
 {
@@ -122,4 +135,10 @@
 }
 
+/** Main tmon entry point.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int main(int argc, char *argv[])
 {
Index: uspace/app/tmon/resolve.c
===================================================================
--- uspace/app/tmon/resolve.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/resolve.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -44,4 +44,9 @@
 #define NAME "tmon"
 
+/** Resolve a single function by its class (fail if there is more/less than 1).
+ * @param[out] fun Resolved function handle (if found).
+ *
+ * @return EOK if the function was resolved successfully.
+ */
 int tmon_resolve_default(devman_handle_t *fun)
 {
@@ -79,4 +84,10 @@
 }
 
+/** Resolve a function by its name or device path.
+ * @param[in] dev_path Name or device path (see `devman_fun_get_handle` for possible values).
+ * @param[out] fun Resolved function handle (if found).
+ *
+ * @return EOK if the function was resolved successfully.
+ */
 int tmon_resolve_named(const char *dev_path, devman_handle_t *fun)
 {
Index: uspace/app/tmon/tf.c
===================================================================
--- uspace/app/tmon/tf.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/tf.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -45,5 +45,13 @@
 #define MAX_PATH_LENGTH 1024
 
-int tmon_test_main(int argc, char *argv[], const tmon_test_ops_t *ops) {
+/** Common command handler for all test commands.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
+int tmon_test_main(int argc, char *argv[], const tmon_test_ops_t *ops)
+{
+	// Resolve device function.
 	devman_handle_t fun = -1;
 
@@ -67,4 +75,5 @@
 	printf("Using device: %s\n", path);
 
+	// Read test parameters from options.
 	tmon_test_params_t *params = NULL;
 	if ((rc = ops->read_params(argc, argv, &params))) {
@@ -73,4 +82,5 @@
 	}
 
+	// Run the test body.
 	async_sess_t *sess = usbdiag_connect(fun);
 	if (!sess) {
Index: uspace/app/tmon/tf.h
===================================================================
--- uspace/app/tmon/tf.h	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/tf.h	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -41,4 +41,5 @@
 /** Parameters common for all tests. */
 typedef struct tmon_test_params {
+	/* Nothing here. */
 } tmon_test_params_t;
 
