phy: core: add debugfs root
Subsystems (3)
Chunfeng Yun
maintainerPATCH v3 1/2 phy: core: add debugfs root
Add a debugfs root for phy class, then phy drivers can add debugfs files under this folder.
Signed-off-by Chunfeng Yun <[email protected]>
---
v2~v3: no changes
--- drivers/phy/phy-core.c | 6 ++++++ include/linux/phy/phy.h | 2 ++ 2 files changed, 8 insertions(+)
drivers/phy/phy-core.c +6 -0
@@ -11,6 +11,7 @@#include <linux/export.h> #include <linux/module.h> #include <linux/err.h> +#include <linux/debugfs.h> #include <linux/device.h> #include <linux/slab.h> #include <linux/of.h>
@@ -1204,6 +1205,9 @@ void devm_of_phy_provider_unregister(struct device *dev, }EXPORT_SYMBOL_GPL (devm_of_phy_provider_unregister); +struct dentry *phy_debug_root; +EXPORT_SYMBOL_GPL (phy_debug_root); +/** * phy_release() - release the phy * @dev: the dev member within phy
@@ -1233,6 +1237,8 @@ static int __init phy_core_init(void) phy_class->dev_release = phy_release; + phy_debug_root =debugfs_create_dir ("phy" ,NULL ); +return 0 ; }device_initcall (phy_core_init);
include/linux/phy/phy.h +2 -0
@@ -205,6 +205,8 @@ struct phy_lookup {#define devm_of_phy_provider_register_full (dev, children, xlate) \ __devm_of_phy_provider_register(dev, children, THIS_MODULE, xlate) +extern struct dentry *phy_debug_root; +static inline void phy_set_drvdata (struct phy *phy,void *data) {dev_set_drvdata (&phy->dev, data);
Signature · 1 line
2.18.0
Chunfeng Yun
maintainerPATCH v3 2/2 phy: mediatek: tphy: add debugfs files
These debugfs files are mainly used to make eye diagram test easier, especially helpful to do HQA test for a new IC without efuse enabled.
Signed-off-by Chunfeng Yun <[email protected]>
---
v3: fix typo of "debugfs" suggested by AngeloGioacchino
v2: add CONFIG_PHY_MTK_TPHY_DEBUGFS suggested by AngeloGioacchino
--- drivers/phy/mediatek/Kconfig | 5 + drivers/phy/mediatek/phy-mtk-tphy.c | 403 +++++++++++++++++++++++++++- 2 files changed, 407 insertions(+), 1 deletion(-)
drivers/phy/mediatek/Kconfig +5 -0
@@ -27,6 +27,11 @@ config PHY_MTK_TPHY multi-ports is first version, otherwise is second version, so you can easily distinguish them by banks layout. +config PHY_MTK_TPHY_DEBUGFS + bool "Add T-PHY Debugfs Files" + help + Say Y here to add debugfs files mainly for T-PHY HQA test. + config PHY_MTK_UFS tristate "MediaTek UFS M-PHY driver" depends on ARCH_MEDIATEK || COMPILE_TEST
drivers/phy/mediatek/phy-mtk-tphy.c +402 -1
457 lines not on this page · raw message
Signature · 1 line
2.18.0