JIRA: https://issues.redhat.com/browse/RHEL-57750 commit 4a83abcef5f4f36be4e04ba18edd64226f6f4a19 Author: Kory Maincent (Dent Project) <kory.maincent@bootlin.com> Date: Thu Jul 4 10:11:59 2024 +0200 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 <saikrishnag@marvell.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-4-320003204264@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Conflicts: drivers/net/pse-pd/pse_core.c - Dropped the hunk. CONFIG_PSE_CONTROLLER is disabled in RHEL 9. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> |
||
---|---|---|
.. | ||
pse.h |