Skip to contentSkip to conversation

net: pse-pd: Fixes for few small issues

PATCH Superseded Kory Maincent (Dent Project) 3 participants 9 messages Apr 22, 2024 – Apr 23, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover net: pse-pd: Fixes for few small issues

From: Kory Maincent (Dent Project) <[email protected]>

This patch series fix few issues in PSE net subsystem like Regulator dependency, PSE regulator type and kernel Documentation.

---
Changes in v2:
- Remove "Dent project" from my sob.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Kory Maincent (Dent Project) (3):
net: pse-pd: pse_core: Add missing kdoc return description
net: pse-pd: pse_core: Fix pse regulator type
net: pse-pd: Kconfig: Add missing Regulator API dependency

 drivers/net/pse-pd/Kconfig    |  2 +-
 drivers/net/pse-pd/pse_core.c | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

---
base-commit: 6a57f091622a1251c2826f7380577049199b80ea
change-id: 20240422-fix_poe-d0fb292c9d8e

Best regards,

Signature · 3 lines
K�ry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#1 lore raw

PATCH v2 1/3 net: pse-pd: pse_core: Add missing kdoc return description

From: Kory Maincent (Dent Project) <[email protected]>

Add missing kernel documentation return description. This allows to remove all warning from kernel-doc test script.

---
 drivers/net/pse-pd/pse_core.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/pse-pd/pse_core.c +8 -0
index 31f23c454678..bad29eaa4d01 100644
@@ -320,6 +320,8 @@ devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,
 /**
  * pse_controller_register - register a PSE controller device
  * @pcdev: a pointer to the initialized PSE controller device
+ *
+ * Return: 0 on success and failure value on error
  */
 int pse_controller_register(struct pse_controller_dev *pcdev)
 {
@@ -401,6 +403,8 @@ static void devm_pse_controller_release(struct device *dev, void *res)
  * Managed pse_controller_register(). For PSE controllers registered by
  * this function, pse_controller_unregister() is automatically called on
  * driver detach. See pse_controller_register() for more information.
+ *
+ * Return: 0 on success and failure value on error
  */
 int devm_pse_controller_register(struct device *dev,
 				 struct pse_controller_dev *pcdev)
@@ -627,6 +631,8 @@ EXPORT_SYMBOL_GPL(of_pse_control_get);
  * @psec: PSE control pointer
  * @extack: extack for reporting useful error messages
  * @status: struct to store PSE status
+ *
+ * Return: 0 on success and failure value on error
  */
 int pse_ethtool_get_status(struct pse_control *psec,
 			   struct netlink_ext_ack *extack,
@@ -704,6 +710,8 @@ static int pse_ethtool_podl_set_config(struct pse_control *psec,
  * @psec: PSE control pointer
  * @extack: extack for reporting useful error messages
  * @config: Configuration of the test to run
+ *
+ * Return: 0 on success and failure value on error
  */
 int pse_ethtool_set_config(struct pse_control *psec,
 			   struct netlink_ext_ack *extack,
Signature · 1 line
2.34.1
#3 lore raw

PATCH v2 2/3 net: pse-pd: pse_core: Fix pse regulator type

In reply to Kory Maincent (Dent Project)

From: Kory Maincent (Dent Project) <[email protected]>

Clarify PSE regulator as voltage regulator, not current.
The PSE (Power Sourcing Equipment) regulator is defined as a voltage regulator, maintaining fixed voltage while accommodating varying current.

---
 drivers/net/pse-pd/pse_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/pse-pd/pse_core.c +1 -1
index bad29eaa4d01..795ab264eaf2 100644
@@ -294,7 +294,7 @@ devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,
 	 */
 	rdesc->id = id;
 	rdesc->name = name;
-	rdesc->type = REGULATOR_CURRENT;
+	rdesc->type = REGULATOR_VOLTAGE;
 	rdesc->ops = &pse_pi_ops;
 	rdesc->owner = pcdev->owner;
 
Signature · 1 line
2.34.1
#7 lore raw

PATCH v2 3/3 net: pse-pd: Kconfig: Add missing Regulator API dependency

In reply to Kory Maincent (Dent Project)

From: Kory Maincent (Dent Project) <[email protected]>

The PSE (Power Sourcing Equipment) API now relies on the Regulator API. However, the Regulator dependency was missing from Kconfig. This patch adds the necessary dependency, resolving the issue of the missing dependency and ensuring proper functionality of the PSE API.

---
 drivers/net/pse-pd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/pse-pd/Kconfig +1 -1
index 80cf373a5a0e..577ea904b3d9 100644
@@ -5,6 +5,7 @@
 
 menuconfig PSE_CONTROLLER
 	bool "Ethernet Power Sourcing Equipment Support"
+	depends on REGULATOR
 	help
 	  Generic Power Sourcing Equipment Controller support.
 
@@ -14,7 +15,6 @@ if PSE_CONTROLLER
 
 config PSE_REGULATOR
 	tristate "Regulator based PSE controller"
-	depends on REGULATOR || COMPILE_TEST
 	help
 	  This module provides support for simple regulator based Ethernet Power
 	  Sourcing Equipment without automatic classification support. For
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH net-next v2 2/3] net: pse-pd: pse_core: Fix pse regulator type

In reply to Kory Maincent (Dent Project)
Quoted 8 lines · Mon, Apr 22, 2024 at 03:35:47PM CEST, [email protected] wrote:

From: Kory Maincent (Dent Project) <[email protected]>

Clarify PSE regulator as voltage regulator, not current.
The PSE (Power Sourcing Equipment) regulator is defined as a voltage regulator, maintaining fixed voltage while accommodating varying current.

This looks like a fix. Can you provide "Fixes" tag please and perhaps send this to -net tree?

Thanks!

Quoted 22 lines

---
drivers/net/pse-pd/pse_core.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/pse-pd/pse_core.c +1 -1
index bad29eaa4d01..795ab264eaf2 100644
@@ -294,7 +294,7 @@ devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,
 	 */
 	rdesc->id = id;
 	rdesc->name = name;
-	rdesc->type = REGULATOR_CURRENT;
+	rdesc->type = REGULATOR_VOLTAGE;
 	rdesc->ops = &pse_pi_ops;
 	rdesc->owner = pcdev->owner;
 
Signature · 2 lines
-- 
2.34.1
author maintainer
#5 lore raw

Re: [PATCH net-next v2 2/3] net: pse-pd: pse_core: Fix pse regulator type

Quoted 7 lines · On Mon, 22 Apr 2024 17:02:18 +0200 Jiri Pirko <[email protected]> wrote:
Quoted 6 lines · Mon, Apr 22, 2024 at 03:35:47PM CEST, [email protected] wrote:

From: Kory Maincent (Dent Project) <[email protected]>

Clarify PSE regulator as voltage regulator, not current.
The PSE (Power Sourcing Equipment) regulator is defined as a voltage regulator, maintaining fixed voltage while accommodating varying current.

Quoted 5 lines
Quoted 2 lines

This looks like a fix. Can you provide "Fixes" tag please and perhaps send this to -net tree?

Indeed I should have used the Fixes tag.
The PoE patch series that introduce this issue is currently in net-next.

Regards,

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
maintainer Acked-by
#6 lore raw

Re: [PATCH net-next v2 2/3] net: pse-pd: pse_core: Fix pse regulator type

Quoted 10 lines · Kory Maincent
Quoted 7 lines · On Mon, 22 Apr 2024 17:02:18 +0200 Jiri Pirko <[email protected]> wrote:
Quoted 6 lines · Mon, Apr 22, 2024 at 03:35:47PM CEST, [email protected] wrote:

From: Kory Maincent (Dent Project) <[email protected]>

Clarify PSE regulator as voltage regulator, not current.
The PSE (Power Sourcing Equipment) regulator is defined as a voltage regulator, maintaining fixed voltage while accommodating varying current.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This looks like a fix. Can you provide "Fixes" tag please and perhaps send this to -net tree?

Indeed I should have used the Fixes tag.
The PoE patch series that introduce this issue is currently in net-next.

With Fixes tag:

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer Acked-by on v2 1/3
#2 lore raw

Re: [PATCH net-next v2 1/3] net: pse-pd: pse_core: Add missing kdoc return description

In reply to Kory Maincent (Dent Project)
Quoted 7 lines · Kory Maincent (Dent Project)

From: Kory Maincent (Dent Project) <[email protected]>

Add missing kernel documentation return description. This allows to remove all warning from kernel-doc test script.

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer Acked-by on v2 3/3
#8 lore raw

Re: [PATCH net-next v2 3/3] net: pse-pd: Kconfig: Add missing Regulator API dependency

In reply to Kory Maincent (Dent Project)
Quoted 7 lines · Kory Maincent (Dent Project)

From: Kory Maincent (Dent Project) <[email protected]>

The PSE (Power Sourcing Equipment) API now relies on the Regulator API. However, the Regulator dependency was missing from Kconfig. This patch adds the necessary dependency, resolving the issue of the missing dependency and ensuring proper functionality of the PSE API.

Quoted 6 lines
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |