From: Vinod Koul <vkoul@kernel.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Kishon Vijay Abraham I <kishon@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Eddie Hung <eddie.hung@mediatek.com>
Subject: Re: [PATCH v7 2/3] phy: core: add debugfs root
Date: Thu, 2 Feb 2023 18:41:57 +0530 [thread overview]
Message-ID: <Y9u2nTgCcb/Et60d@matsya> (raw)
In-Reply-To: <20230118084343.26913-2-chunfeng.yun@mediatek.com>
On 18-01-23, 16:43, Chunfeng Yun wrote:
> Add a debugfs root for phy class, then phy drivers can add debugfs files
> under this folder.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2~v7: no changes
> ---
> drivers/phy/phy-core.c | 6 ++++++
> include/linux/phy/phy.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index d93ddf1262c5..2f9f69190519 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -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);
Please make this a member of struct phy, that way all phy drivers have access
to this and we wont need to export this!
> +
> /**
> * 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);
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index b1413757fcc3..c398749d49b9 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -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);
> --
> 2.18.0
--
~Vinod
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Kishon Vijay Abraham I <kishon@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Eddie Hung <eddie.hung@mediatek.com>
Subject: Re: [PATCH v7 2/3] phy: core: add debugfs root
Date: Thu, 2 Feb 2023 18:41:57 +0530 [thread overview]
Message-ID: <Y9u2nTgCcb/Et60d@matsya> (raw)
In-Reply-To: <20230118084343.26913-2-chunfeng.yun@mediatek.com>
On 18-01-23, 16:43, Chunfeng Yun wrote:
> Add a debugfs root for phy class, then phy drivers can add debugfs files
> under this folder.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2~v7: no changes
> ---
> drivers/phy/phy-core.c | 6 ++++++
> include/linux/phy/phy.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index d93ddf1262c5..2f9f69190519 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -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);
Please make this a member of struct phy, that way all phy drivers have access
to this and we wont need to export this!
> +
> /**
> * 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);
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index b1413757fcc3..c398749d49b9 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -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);
> --
> 2.18.0
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Kishon Vijay Abraham I <kishon@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Eddie Hung <eddie.hung@mediatek.com>
Subject: Re: [PATCH v7 2/3] phy: core: add debugfs root
Date: Thu, 2 Feb 2023 18:41:57 +0530 [thread overview]
Message-ID: <Y9u2nTgCcb/Et60d@matsya> (raw)
In-Reply-To: <20230118084343.26913-2-chunfeng.yun@mediatek.com>
On 18-01-23, 16:43, Chunfeng Yun wrote:
> Add a debugfs root for phy class, then phy drivers can add debugfs files
> under this folder.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2~v7: no changes
> ---
> drivers/phy/phy-core.c | 6 ++++++
> include/linux/phy/phy.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index d93ddf1262c5..2f9f69190519 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -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);
Please make this a member of struct phy, that way all phy drivers have access
to this and we wont need to export this!
> +
> /**
> * 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);
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index b1413757fcc3..c398749d49b9 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -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);
> --
> 2.18.0
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-02 13:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 8:43 [PATCH v7 1/3] phy: mediatek: remove temporary variable @mask_ Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 8:43 ` [PATCH v7 2/3] phy: core: add debugfs root Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-02-02 13:11 ` Vinod Koul [this message]
2023-02-02 13:11 ` Vinod Koul
2023-02-02 13:11 ` Vinod Koul
2023-02-07 9:37 ` Chunfeng Yun (云春峰)
2023-02-07 9:37 ` Chunfeng Yun (云春峰)
2023-02-07 9:37 ` Chunfeng Yun (云春峰)
2023-01-18 8:43 ` [PATCH v7 3/3] phy: mediatek: tphy: add debugfs files Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 8:43 ` Chunfeng Yun
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` [PATCH v7 1/3] phy: mediatek: remove temporary variable @mask_ AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-01-18 12:29 ` AngeloGioacchino Del Regno
2023-02-02 13:05 ` Vinod Koul
2023-02-02 13:05 ` Vinod Koul
2023-02-02 13:05 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9u2nTgCcb/Et60d@matsya \
--to=vkoul@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunfeng.yun@mediatek.com \
--cc=eddie.hung@mediatek.com \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.