-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: mtu3: add debugfs interface files
This adds more debugfs consumers. The debugfs entries read some important registers, fifo status, QMU ring, endpoint status, and IPPC probe interface to get internal status. With these entries, users can check the registers, endpoint and GPD used during run time. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Chunfeng Yun
authored and
Greg Kroah-Hartman
committed
Mar 26, 2019
1 parent
48e0d37
commit ae07809
Showing
7 changed files
with
503 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* mtu3_debug.h - debug header | ||
* | ||
* Copyright (C) 2019 MediaTek Inc. | ||
* | ||
* Author: Chunfeng Yun <chunfeng.yun@mediatek.com> | ||
*/ | ||
|
||
#ifndef __MTU3_DEBUG_H__ | ||
#define __MTU3_DEBUG_H__ | ||
|
||
#include <linux/debugfs.h> | ||
|
||
#define MTU3_DEBUGFS_NAME_LEN 32 | ||
|
||
struct mtu3_regset { | ||
char name[MTU3_DEBUGFS_NAME_LEN]; | ||
struct debugfs_regset32 regset; | ||
size_t nregs; | ||
}; | ||
|
||
struct mtu3_file_map { | ||
const char *name; | ||
int (*show)(struct seq_file *s, void *unused); | ||
}; | ||
|
||
#if IS_ENABLED(CONFIG_DEBUG_FS) | ||
void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); | ||
void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); | ||
void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); | ||
|
||
#else | ||
static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {} | ||
static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {} | ||
static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {} | ||
|
||
#endif /* CONFIG_DEBUG_FS */ | ||
|
||
#endif /* __MTU3_DEBUG_H__ */ |
Oops, something went wrong.