b6cacaf204
People testing have a need to know how many errors might be occurring over time. Add error counters and expose them via debugfs. A module initcall is used to create a debugfs root directory for ufshcd-related items. In the case that modules are built-in, then initialization is done in link order, so move ufshcd-core to the top of the Makefile. Link: https://lore.kernel.org/r/20210107072538.21782-1-adrian.hunter@intel.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Bean Huo <beanhuo@micron.com> Reviewed-by: Can Guo <cang@codeaurora.org> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
23 lines
584 B
C
23 lines
584 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2020 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __UFS_DEBUGFS_H__
|
|
#define __UFS_DEBUGFS_H__
|
|
|
|
struct ufs_hba;
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
void __init ufs_debugfs_init(void);
|
|
void __exit ufs_debugfs_exit(void);
|
|
void ufs_debugfs_hba_init(struct ufs_hba *hba);
|
|
void ufs_debugfs_hba_exit(struct ufs_hba *hba);
|
|
#else
|
|
static inline void ufs_debugfs_init(void) {}
|
|
static inline void ufs_debugfs_exit(void) {}
|
|
static inline void ufs_debugfs_hba_init(struct ufs_hba *hba) {}
|
|
static inline void ufs_debugfs_hba_exit(struct ufs_hba *hba) {}
|
|
#endif
|
|
|
|
#endif
|