summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/debugfs.h
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2020-08-06 20:09:49 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-08-21 06:47:49 +0200
commitabd9875497ba47e198fb565f11d5f332eeb08ab3 (patch)
tree1c3a82a33daaa53669343e25e0bc6731bfacf7c8 /drivers/crypto/caam/debugfs.h
parenthwrng: optee - fix wait use case (diff)
downloadlinux-abd9875497ba47e198fb565f11d5f332eeb08ab3.tar.xz
linux-abd9875497ba47e198fb565f11d5f332eeb08ab3.zip
crypto: caam - Move debugfs fops into standalone file
Currently the debugfs fops are defined in caam/intern.h. This causes problems because it creates identical static functions and variables in multiple files. It also creates warnings when those files don't use the fops. This patch moves them into a standalone file, debugfs.c. It also removes unnecessary uses of ifdefs on CONFIG_DEBUG_FS. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> [Moved most of debugfs-related operations into debugfs.c.] Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/debugfs.h')
-rw-r--r--drivers/crypto/caam/debugfs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/crypto/caam/debugfs.h b/drivers/crypto/caam/debugfs.h
new file mode 100644
index 000000000000..661d768acdbf
--- /dev/null
+++ b/drivers/crypto/caam/debugfs.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
+/* Copyright 2019 NXP */
+
+#ifndef CAAM_DEBUGFS_H
+#define CAAM_DEBUGFS_H
+
+struct dentry;
+struct caam_drv_private;
+
+#ifdef CONFIG_DEBUG_FS
+void caam_debugfs_init(struct caam_drv_private *ctrlpriv, struct dentry *root);
+#else
+static inline void caam_debugfs_init(struct caam_drv_private *ctrlpriv,
+ struct dentry *root)
+{}
+#endif
+
+#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_CAAM_QI)
+void caam_debugfs_qi_congested(void);
+void caam_debugfs_qi_init(struct caam_drv_private *ctrlpriv);
+#else
+static inline void caam_debugfs_qi_congested(void) {}
+static inline void caam_debugfs_qi_init(struct caam_drv_private *ctrlpriv) {}
+#endif
+
+#endif /* CAAM_DEBUGFS_H */