Skip to content
Snippets Groups Projects
Commit 3eebf41f authored by Li Jun's avatar Li Jun
Browse files

LF-4259-1 phy: add debugfs root entry


Add a root debugfs dir for generic phy subsystem.

Reviewed-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
parent d12a9c62
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/debugfs.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -24,6 +25,8 @@ static DEFINE_MUTEX(phy_provider_mutex); ...@@ -24,6 +25,8 @@ static DEFINE_MUTEX(phy_provider_mutex);
static LIST_HEAD(phy_provider_list); static LIST_HEAD(phy_provider_list);
static LIST_HEAD(phys); static LIST_HEAD(phys);
static DEFINE_IDA(phy_ida); static DEFINE_IDA(phy_ida);
struct dentry *phy_debugfs_root;
EXPORT_SYMBOL_GPL(phy_debugfs_root);
static void devm_phy_release(struct device *dev, void *res) static void devm_phy_release(struct device *dev, void *res)
{ {
...@@ -1163,6 +1166,8 @@ static int __init phy_core_init(void) ...@@ -1163,6 +1166,8 @@ static int __init phy_core_init(void)
phy_class->dev_release = phy_release; phy_class->dev_release = phy_release;
phy_debugfs_root = debugfs_create_dir("phy", NULL);
return 0; return 0;
} }
device_initcall(phy_core_init); device_initcall(phy_core_init);
...@@ -201,6 +201,8 @@ static inline void *phy_get_drvdata(struct phy *phy) ...@@ -201,6 +201,8 @@ static inline void *phy_get_drvdata(struct phy *phy)
return dev_get_drvdata(&phy->dev); return dev_get_drvdata(&phy->dev);
} }
extern struct dentry *phy_debugfs_root;
#if IS_ENABLED(CONFIG_GENERIC_PHY) #if IS_ENABLED(CONFIG_GENERIC_PHY)
int phy_pm_runtime_get(struct phy *phy); int phy_pm_runtime_get(struct phy *phy);
int phy_pm_runtime_get_sync(struct phy *phy); int phy_pm_runtime_get_sync(struct phy *phy);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment