Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: regulator: fix getting gpio for level control
Swap the 2 calls to find gpio property in "regulator-gpio" compatible node. The call that expects to get a TEE_ERROR_ITEM_NOT_FOUND return value (as described in the inline comment) for an unsupported 2nd level control GPIO can fail with TEE_ERROR_DEFER_DRIVER_INIT return value when the 1st GPIO phandle listed in the 'gpios' DT node property relates to a GPIO driver that is not yet probed. Fix that by first getting the required GPIO control level and then testing presence of other GPIO phandle in the 'gpios' DT property. Fixes: f164f0f ("drivers: regulator: GPIO controlled regulator") Reviewed-by: Gatien Chevallier <[email protected]> Signed-off-by: Etienne Carriere <[email protected]>
- Loading branch information