2022-06-20 15:24:33

by Aisheng Dong

[permalink] [raw]
Subject: [PATCH RFC 0/2] regmap: option to disable debugfs

Current regmap core will create debugfs by default for each instance.
However, it's fairly possible that some devices may not work properly
with regmap registers dump via debugfs due to it may be in suspend
state (e.g. Power domain is off).

This patchset allows user to claim no debugfs support due to platform
limitations.

Dong Aisheng (2):
regmap: add option to disable debugfs
soc: imx8m-blk-ctrl: do not export debugfs

drivers/base/regmap/regmap-debugfs.c | 3 ++-
drivers/base/regmap/regmap.c | 3 +++
drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
include/linux/regmap.h | 2 ++
4 files changed, 8 insertions(+), 1 deletion(-)

--
2.25.1


2022-06-20 15:29:27

by Aisheng Dong

[permalink] [raw]
Subject: [PATCH RFC 2/2] soc: imx8m-blk-ctrl: do not export debugfs

imx8m blkctl does not support registers dumping via regmap debugfs
due to power domain required which is not supported by current regmap
core. So let's claim no debugfs support, otherwise the system may
hang when dumping registers through regmap debugfs.

Cc: Mark Brown <[email protected]>
Cc: Lucas Stach <[email protected]>
Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 7ebc28709e94..a064670576e8 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -179,6 +179,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
+ .disable_debugfs = true,
};

bc = devm_kzalloc(dev, sizeof(*bc), GFP_KERNEL);
--
2.25.1