| 5385f1e1 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time
net: pse-pd: Clean ethtool header of PSE structures
Remove PSE-specific structures from the ethtool header to improve code modularity, maintain independent headers, and reduce incremental build time.
Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 10276f3e | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Fix missing PI of_node description
The PI of_node was not assigned in the regulator_config structure, leading to failures in resolving the correct supply when different power supplies a
net: pse-pd: Fix missing PI of_node description
The PI of_node was not assigned in the regulator_config structure, leading to failures in resolving the correct supply when different power supplies are assigned to multiple PIs of a PSE controller. This fix ensures that the of_node is properly set in the regulator_config, allowing accurate supply resolution for each PI.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 7f076ce3 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: tps23881: Add support for power limit and measurement features
Expand PSE callbacks to support the newly introduced pi_get/set_pw_limit() and pi_get_voltage() functions. These callbacks
net: pse-pd: tps23881: Add support for power limit and measurement features
Expand PSE callbacks to support the newly introduced pi_get/set_pw_limit() and pi_get_voltage() functions. These callbacks allow for power limit configuration in the TPS23881 controller.
Additionally, the patch includes the pi_get_pw_class() the pi_get_actual_pw(), and the pi_get_pw_limit_ranges') callbacks providing more comprehensive PoE status reporting.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 4640a1f0 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simpl
net: pse-pd: Remove is_enabled callback from drivers
The is_enabled callback is now redundant as the admin_state can be obtained directly from the driver and provides the same information.
To simplify functionality, the core will handle this internally, making the is_enabled callback unnecessary at the driver level. Remove the callback from all drivers.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 3e9dbfec | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key dra
net: pse-pd: Split ethtool_get_status into multiple callbacks
The ethtool_get_status callback currently handles all status and PSE information within a single function. This approach has two key drawbacks:
1. If the core requires some information for purposes other than ethtool_get_status, redundant code will be needed to fetch the same data from the driver (like is_enabled).
2. Drivers currently have access to all information passed to ethtool. New variables will soon be added to ethtool status, such as PSE ID, power domain IDs, and budget evaluation strategies, which are meant to be managed solely by the core. Drivers should not have the ability to modify these variables.
To resolve these issues, ethtool_get_status has been split into multiple callbacks, with each handling a specific piece of information required by ethtool or the core.
Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| e0a5e2bb | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of conv
net: pse-pd: Use power limit at driver side instead of current limit
The regulator framework uses current limits, but the PSE standard and known PSE controllers rely on power limits. Instead of converting current to power within each driver, perform the conversion in the PSE core. This avoids redundancy in driver implementation and aligns better with the standard, simplifying driver development.
Remove at the same time the _pse_ethtool_get_status() function which is not needed anymore.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| f3cb3c7b | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: tps23881: Add missing configuration register after disable
When setting the PWOFF register, the controller resets multiple configuration registers. This patch ensures these registers ar
net: pse-pd: tps23881: Add missing configuration register after disable
When setting the PWOFF register, the controller resets multiple configuration registers. This patch ensures these registers are reconfigured as needed following a disable operation.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 4c2bab50 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel
This driver frequently follows a pattern where two registers are read or written in a single operation, followed by calculati
net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel
This driver frequently follows a pattern where two registers are read or written in a single operation, followed by calculating the bit offset for a specific channel.
Introduce helpers to streamline this process and reduce code redundancy, making the codebase cleaner and more maintainable.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 0b567519 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: tps23881: Simplify function returns by removing redundant checks
Cleaned up several functions in tps23881 by removing redundant checks on return values at the end of functions. These ch
net: pse-pd: tps23881: Simplify function returns by removing redundant checks
Cleaned up several functions in tps23881 by removing redundant checks on return values at the end of functions. These check has been removed, and the return statement now directly returns the function result, reducing the code's complexity and making it more concise.
Reviewed-by: Andrew Lunn <[email protected]> Acked-by: Oleksij Rempel <[email protected]> Reviewed-by: Kyle Swenson <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 6e56a6d4 | 10-Jan-2025 |
Kory Maincent <[email protected]> |
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit de
net: pse-pd: Add power limit check
Checking only the current limit is not sufficient. According to the standard, voltage can reach up to 57V and current up to 1.92A, which exceeds the power limit described in the standard (99.9W). Add a power limit check to prevent this.
Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 4a83abce | 04-Jul-2024 |
Kory Maincent (Dent Project) <[email protected]> |
net: pse-pd: Add new power limit get and set c33 features
This patch add a way to get and set the power limit of a PSE PI. For that it uses regulator API callbacks wrapper like get_voltage() and get
net: pse-pd: Add new power limit get and set c33 features
This patch add a way to get and set the power limit of a PSE PI. For that it uses regulator API callbacks wrapper like get_voltage() and get/set_current_limit() as power is simply V * I. We used mW unit as defined by the IEEE 802.3-2022 standards.
set_current_limit() uses the voltage return by get_voltage() and the desired power limit to calculate the current limit. get_voltage() callback is then mandatory to set the power limit.
get_current_limit() callback is by default looking at a driver callback and fallback to extracting the current limit from _pse_ethtool_get_status() if the driver does not set its callback. We prefer let the user the choice because ethtool_get_status return much more information than the current limit.
expand pse status with c33_pw_limit_ranges to return the ranges available to configure the power limit.
Reviewed-by: Sai Krishna <[email protected]> Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|