[][openwrt][mt7988][tops][refactor tops-tool and add logger suuport]

[Description]
Refactor tops-tool and add logger support

add menu config for tops-tool
move common code into common part

save log cmd will open log relayfs and save
its data(log) as file in the filesystem

log relayfs path :
/sys/kernel/debug/tops/log-mgmt0
/sys/kernel/debug/tops/log-offload0

log file path :
<LOG_DIR>/log-mgmt-<time>
<LOG_DIR>/log-offload-<time>

[Release-log]
N/A

Change-Id: I1c563efbb584540eeb1b78c2a438c0173c4cdbba
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7988095
diff --git a/feed/app/tops-tool/src/inc/tops-tool.h b/feed/app/tops-tool/src/inc/tops-tool.h
new file mode 100644
index 0000000..f7a394a
--- /dev/null
+++ b/feed/app/tops-tool/src/inc/tops-tool.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier:	GPL-2.0+ */
+/*
+ * Copyright (C) 2023 MediaTek Incorporation. All Rights Reserved.
+ *
+ * Author: Alvin Kuo <Alvin.Kuo@mediatek.com>
+ */
+
+#ifndef __TOPS_TOOL_H__
+#define __TOPS_TOOL_H__
+
+#include "tops-tool-cmds.h"
+
+#define TOPS_TOOL_CMD(cmd_name)			TOPS_TOOL_CMD_ ## cmd_name
+
+typedef int (*tops_tool_cmd_func_t)(int argc, char *argv[]);
+
+struct tops_tool_cmd {
+	char *name;
+	char *usage;
+	char *desc;
+	tops_tool_cmd_func_t func;
+	uint8_t num_of_parms;
+};
+
+#endif /* __TOPS_TOOL_H__ */