diff options
author | Oleksij Rempel <[email protected]> | 2024-08-13 09:37:19 +0200 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2024-08-15 12:51:32 +0200 |
commit | cdc90f75387c42d64a0ed1ba03550ea9447249d4 (patch) | |
tree | 18a66d76a3d7ff6262d65b4369f8fa67683753d7 /scripts/rustdoc_test_builder.rs | |
parent | 1f1b194284093d619c9fbc7e9e38b2c68d0408e8 (diff) |
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: 4a83abcef5f4f ("net: pse-pd: Add new power limit get and set c33 features")
Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Kory Maincent <[email protected]>
Tested-by: Kyle Swenson <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions