From cf90098dbb1f784661354ff8f7ca293e1ff8153b Mon Sep 17 00:00:00 2001 From: Sergey Ryazanov Date: Tue, 7 Dec 2021 12:21:39 +0300 Subject: net: wwan: iosm: move debugfs knobs into a subdir The modem traces collection is a device (and so driver) specific option. Therefore, move the related debugfs files into a driver-specific subdirectory under the common per WWAN device directory. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Acked-by: M Chetan Kumar Signed-off-by: Jakub Kicinski --- drivers/net/wwan/iosm/iosm_ipc_debugfs.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 drivers/net/wwan/iosm/iosm_ipc_debugfs.c (limited to 'drivers/net/wwan/iosm/iosm_ipc_debugfs.c') diff --git a/drivers/net/wwan/iosm/iosm_ipc_debugfs.c b/drivers/net/wwan/iosm/iosm_ipc_debugfs.c new file mode 100644 index 000000000000..f2f57751a7d2 --- /dev/null +++ b/drivers/net/wwan/iosm/iosm_ipc_debugfs.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2020-2021 Intel Corporation. + */ + +#include +#include + +#include "iosm_ipc_imem.h" +#include "iosm_ipc_trace.h" +#include "iosm_ipc_debugfs.h" + +void ipc_debugfs_init(struct iosm_imem *ipc_imem) +{ + struct dentry *debugfs_pdev = wwan_get_debugfs_dir(ipc_imem->dev); + + ipc_imem->debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, + debugfs_pdev); + + ipc_imem->trace = ipc_trace_init(ipc_imem); + if (!ipc_imem->trace) + dev_warn(ipc_imem->dev, "trace channel init failed"); +} + +void ipc_debugfs_deinit(struct iosm_imem *ipc_imem) +{ + ipc_trace_deinit(ipc_imem->trace); + debugfs_remove_recursive(ipc_imem->debugfs_dir); +} -- cgit v1.2.3-70-g09d2