* [PATCH RESEND 0/2] phy: core: Remove 2 APIs
@ 2025-02-25 12:32 Zijun Hu
0 siblings, 0 replies; 5+ messages in thread
From: Zijun Hu @ 2025-02-25 12:32 UTC (permalink / raw)
To: Jonathan Corbet, Alex Shi, Yanteng Si, Vinod Koul,
Kishon Vijay Abraham I
Cc: Zijun Hu, linux-doc, linux-kernel, linux-phy, Zijun Hu
This patch series is to remove the following 2 APIs:
devm_of_phy_provider_unregister()
devm_phy_destroy()
Both APIs have not had callers for more than 10 years.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Zijun Hu (2):
phy: core: Remove API devm_of_phy_provider_unregister()
phy: core: Remove API devm_phy_destroy()
Documentation/driver-api/phy/phy.rst | 11 ++-----
.../translations/zh_CN/driver-api/phy/phy.rst | 12 ++------
drivers/phy/phy-core.c | 36 ----------------------
include/linux/phy/phy.h | 11 -------
4 files changed, 6 insertions(+), 64 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250210-remove-apis-b4e48d4c4712
Best regards,
--
Zijun Hu <quic_zijuhu@quicinc.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RESEND 0/2] phy: core: Remove 2 APIs
@ 2025-04-14 11:49 Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister() Zijun Hu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Zijun Hu @ 2025-04-14 11:49 UTC (permalink / raw)
To: Jonathan Corbet, Alex Shi, Yanteng Si, Vinod Koul,
Kishon Vijay Abraham I
Cc: Zijun Hu, linux-doc, linux-kernel, linux-phy, Zijun Hu
This patch series is to remove the following 2 APIs:
devm_of_phy_provider_unregister()
devm_phy_destroy()
Both APIs have not had callers for more than 10 years.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Zijun Hu (2):
phy: core: Remove API devm_of_phy_provider_unregister()
phy: core: Remove API devm_phy_destroy()
Documentation/driver-api/phy/phy.rst | 11 ++-----
.../translations/zh_CN/driver-api/phy/phy.rst | 12 ++------
drivers/phy/phy-core.c | 36 ----------------------
include/linux/phy/phy.h | 11 -------
4 files changed, 6 insertions(+), 64 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250210-remove-apis-b4e48d4c4712
Best regards,
--
Zijun Hu <quic_zijuhu@quicinc.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister()
2025-04-14 11:49 [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
@ 2025-04-14 11:49 ` Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 2/2] phy: core: Remove API devm_phy_destroy() Zijun Hu
2025-05-14 22:53 ` [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2 siblings, 0 replies; 5+ messages in thread
From: Zijun Hu @ 2025-04-14 11:49 UTC (permalink / raw)
To: Jonathan Corbet, Alex Shi, Yanteng Si, Vinod Koul,
Kishon Vijay Abraham I
Cc: Zijun Hu, linux-doc, linux-kernel, linux-phy, Zijun Hu
From: Zijun Hu <quic_zijuhu@quicinc.com>
API devm_of_phy_provider_unregister() has not had callers
since 2013-09-27 when it was introduced.
Remove the API.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Documentation/driver-api/phy/phy.rst | 5 +----
.../translations/zh_CN/driver-api/phy/phy.rst | 5 +----
drivers/phy/phy-core.c | 19 -------------------
include/linux/phy/phy.h | 6 ------
4 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst
index 81785c084f3ec2dd02af2131fbc8632cb5b33b0b..be3687a2a11bbf84e6e5561b11931ea6db984434 100644
--- a/Documentation/driver-api/phy/phy.rst
+++ b/Documentation/driver-api/phy/phy.rst
@@ -64,12 +64,9 @@ macros can be used to override the node containing the children.
__devm_of_phy_provider_register_full(dev, children,
THIS_MODULE, xlate)
- void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-devm_of_phy_provider_unregister and of_phy_provider_unregister can be used to
-unregister the PHY.
+of_phy_provider_unregister can be used to unregister the PHY.
Creating the PHY
================
diff --git a/Documentation/translations/zh_CN/driver-api/phy/phy.rst b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
index 0d7489081b904d6fc5aa21824c969e325e801297..2d3f98deb92035c44fcb1ff0e3dc8543053140f6 100644
--- a/Documentation/translations/zh_CN/driver-api/phy/phy.rst
+++ b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
@@ -63,12 +63,9 @@ devm_of_phy_provider_register_full() 宏来覆盖包含子节点的节点。
__devm_of_phy_provider_register_full(dev, children,
THIS_MODULE, xlate)
- void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-devm_of_phy_provider_unregister 和 of_phy_provider_unregister
-可以被用来注销PHY.
+of_phy_provider_unregister() 可以被用来注销PHY.
创建PHY
=======
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 8dfdce605a905d7f38205727151258af41f807a9..dd6302dfd14d2ec060857fc019268096c33e37a2 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -1248,25 +1248,6 @@ void of_phy_provider_unregister(struct phy_provider *phy_provider)
}
EXPORT_SYMBOL_GPL(of_phy_provider_unregister);
-/**
- * devm_of_phy_provider_unregister() - remove phy provider from the framework
- * @dev: struct device of the phy provider
- * @phy_provider: phy provider returned by of_phy_provider_register()
- *
- * destroys the devres associated with this phy provider and invokes
- * of_phy_provider_unregister to unregister the phy provider.
- */
-void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider)
-{
- int r;
-
- r = devres_release(dev, devm_phy_provider_release, devm_phy_match,
- phy_provider);
- dev_WARN_ONCE(dev, r, "couldn't find PHY provider device resource\n");
-}
-EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister);
-
/**
* phy_release() - release the phy
* @dev: the dev member within phy
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 03cd5bae92d3f189d739c453fe4c160dd2a5063e..06037a7eefc4b0319008065d142c9f1caba2c74d 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -288,8 +288,6 @@ struct phy_provider *__devm_of_phy_provider_register(struct device *dev,
struct phy * (*of_xlate)(struct device *dev,
const struct of_phandle_args *args));
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
#else
@@ -547,10 +545,6 @@ static inline void of_phy_provider_unregister(struct phy_provider *phy_provider)
{
}
-static inline void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider)
-{
-}
static inline int
phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RESEND 2/2] phy: core: Remove API devm_phy_destroy()
2025-04-14 11:49 [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister() Zijun Hu
@ 2025-04-14 11:49 ` Zijun Hu
2025-05-14 22:53 ` [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2 siblings, 0 replies; 5+ messages in thread
From: Zijun Hu @ 2025-04-14 11:49 UTC (permalink / raw)
To: Jonathan Corbet, Alex Shi, Yanteng Si, Vinod Koul,
Kishon Vijay Abraham I
Cc: Zijun Hu, linux-doc, linux-kernel, linux-phy, Zijun Hu
From: Zijun Hu <quic_zijuhu@quicinc.com>
API devm_phy_destroy() has not had callers since 2013-09-27
when it was introduced.
Remove the API.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Documentation/driver-api/phy/phy.rst | 6 ++----
Documentation/translations/zh_CN/driver-api/phy/phy.rst | 7 ++-----
drivers/phy/phy-core.c | 17 -----------------
include/linux/phy/phy.h | 5 -----
4 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst
index be3687a2a11bbf84e6e5561b11931ea6db984434..cae03d8a4812b3c4cfca64272cc6b8f83a81d1c8 100644
--- a/Documentation/driver-api/phy/phy.rst
+++ b/Documentation/driver-api/phy/phy.rst
@@ -173,13 +173,11 @@ Destroying the PHY
==================
When the driver that created the PHY is unloaded, it should destroy the PHY it
-created using one of the following 2 APIs::
+created using the following API::
void phy_destroy(struct phy *phy);
- void devm_phy_destroy(struct device *dev, struct phy *phy);
-Both these APIs destroy the PHY and devm_phy_destroy destroys the devres
-associated with this PHY.
+The API destroys the PHY.
PM Runtime
==========
diff --git a/Documentation/translations/zh_CN/driver-api/phy/phy.rst b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
index 2d3f98deb92035c44fcb1ff0e3dc8543053140f6..37c23fcebf11f397d0dc502bbba11a74c525f085 100644
--- a/Documentation/translations/zh_CN/driver-api/phy/phy.rst
+++ b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
@@ -164,14 +164,11 @@ PHY 关联的设备资源。
销毁 PHY
========
-当创建 PHY 的驱动程序被卸载时,它应该使用以下 2 个 API 之一销毁其创
-建的 PHY::
+当创建 PHY 的驱动程序被卸载时,它应该使用以下 API 销毁其创建的 PHY::
void phy_destroy(struct phy *phy);
- void devm_phy_destroy(struct device *dev, struct phy *phy);
-这两个 API 都会销毁 PHY,并且 devm_phy_destroy 会销毁与此 PHY 关
-联的 devres。
+这个 API 会销毁 PHY。
PM Runtime
==========
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index dd6302dfd14d2ec060857fc019268096c33e37a2..8e0e11553e369e06f5ee4cdbb111b4ddb1b34e74 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -1107,23 +1107,6 @@ void phy_destroy(struct phy *phy)
}
EXPORT_SYMBOL_GPL(phy_destroy);
-/**
- * devm_phy_destroy() - destroy the PHY
- * @dev: device that wants to release this phy
- * @phy: the phy returned by devm_phy_get()
- *
- * destroys the devres associated with this phy and invokes phy_destroy
- * to destroy the phy.
- */
-void devm_phy_destroy(struct device *dev, struct phy *phy)
-{
- int r;
-
- r = devres_release(dev, devm_phy_consume, devm_phy_match, phy);
- dev_WARN_ONCE(dev, r, "couldn't find PHY resource\n");
-}
-EXPORT_SYMBOL_GPL(devm_phy_destroy);
-
/**
* __of_phy_provider_register() - create/register phy provider with the framework
* @dev: struct device of the phy provider
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 06037a7eefc4b0319008065d142c9f1caba2c74d..66eb664249ddaa6635bf80d8db115cb21473ceb8 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -278,7 +278,6 @@ struct phy *phy_create(struct device *dev, struct device_node *node,
struct phy *devm_phy_create(struct device *dev, struct device_node *node,
const struct phy_ops *ops);
void phy_destroy(struct phy *phy);
-void devm_phy_destroy(struct device *dev, struct phy *phy);
struct phy_provider *__of_phy_provider_register(struct device *dev,
struct device_node *children, struct module *owner,
struct phy * (*of_xlate)(struct device *dev,
@@ -521,10 +520,6 @@ static inline void phy_destroy(struct phy *phy)
{
}
-static inline void devm_phy_destroy(struct device *dev, struct phy *phy)
-{
-}
-
static inline struct phy_provider *__of_phy_provider_register(
struct device *dev, struct device_node *children, struct module *owner,
struct phy * (*of_xlate)(struct device *dev,
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND 0/2] phy: core: Remove 2 APIs
2025-04-14 11:49 [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister() Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 2/2] phy: core: Remove API devm_phy_destroy() Zijun Hu
@ 2025-05-14 22:53 ` Zijun Hu
2 siblings, 0 replies; 5+ messages in thread
From: Zijun Hu @ 2025-05-14 22:53 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-doc, linux-kernel, linux-phy, Zijun Hu, Jonathan Corbet,
Alex Shi, Yanteng Si, Kishon Vijay Abraham I
On 2025/4/14 19:49, Zijun Hu wrote:
> This patch series is to remove the following 2 APIs:
>
> devm_of_phy_provider_unregister()
> devm_phy_destroy()
>
> Both APIs have not had callers for more than 10 years.
>
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---
> Zijun Hu (2):
> phy: core: Remove API devm_of_phy_provider_unregister()
> phy: core: Remove API devm_phy_destroy()
>
> Documentation/driver-api/phy/phy.rst | 11 ++-----
> .../translations/zh_CN/driver-api/phy/phy.rst | 12 ++------
> drivers/phy/phy-core.c | 36 ----------------------
> include/linux/phy/phy.h | 11 -------
> 4 files changed, 6 insertions(+), 64 deletions(-)
Hi Vinod,
Gentle ping you for your awareness since this patch series have pended
for more than 3 months without no response.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-14 22:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 11:49 [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister() Zijun Hu
2025-04-14 11:49 ` [PATCH RESEND 2/2] phy: core: Remove API devm_phy_destroy() Zijun Hu
2025-05-14 22:53 ` [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
-- strict thread matches above, loose matches on Subject: below --
2025-02-25 12:32 Zijun Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).