linux-stable/drivers/net/pse-pd
Oleksij Rempel cdc90f7538 pse-core: Conditionally set current limit during PI regulator registration
Fix an issue where `devm_regulator_register()` would fail for PSE
controllers that do not support current limit control, such as simple
GPIO-based controllers like the podl-pse-regulator. The
`REGULATOR_CHANGE_CURRENT` flag and `max_uA` constraint are now
conditionally set only if the `pi_set_current_limit` operation is
supported. This change prevents the regulator registration routine from
attempting to call `pse_pi_set_current_limit()`, which would return
`-EOPNOTSUPP` and cause the registration to fail.

Fixes: 4a83abcef5 ("net: pse-pd: Add new power limit get and set c33 features")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Tested-by: Kyle Swenson <kyle.swenson@est.tech>
Link: https://patch.msgid.link/20240813073719.2304633-1-o.rempel@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-08-15 12:51:32 +02:00
..
Kconfig net: pse-pd: Kconfig: Fix missing firmware loader config select 2024-06-21 11:29:52 +01:00
Makefile net: pse-pd: Add TI TPS23881 PSE controller driver 2024-04-18 18:27:39 -07:00
pd692x0.c net: pse-pd: pd692x0: Fix spelling mistake "availables" -> "available" 2024-07-11 10:00:35 -07:00
pse_core.c pse-core: Conditionally set current limit during PI regulator registration 2024-08-15 12:51:32 +02:00
pse_regulator.c net: pse-pd: Use regulator framework within PSE framework 2024-04-18 18:27:39 -07:00
tps23881.c net: pse-pd: tps23881: include missing bitfield.h header 2024-08-08 08:34:03 -07:00