diff options
author | Kory Maincent (Dent Project) <kory.maincent@bootlin.com> | 2024-07-04 10:11:59 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-05 18:30:00 -0700 |
commit | 4a83abcef5f4f36be4e04ba18edd64226f6f4a19 (patch) | |
tree | 0bbd9c04dcecd425f3131c8032c2be537d8cd8ab /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ae37dc574259f2750e9e2666591b752678fcd7cc (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions