Files
u-boot/drivers/net
Marek Vasut 8777033722 net: eth-phy: Handle gpio_request_by_name() return value
The gpio_request_by_name() returns zero in case of success, however the
conditional return value check in gpio_request_by_name() checks only for
(ret != -ENOENT) and if the condition is true, returns ret outright.

This leads to a situation where successful gpio_request_by_name() return
leads to immediate successful eth_phy_of_to_plat() return as well, and
to skipped parsing of "reset-assert-us" and "reset-deassert-us", so the
PHY driver operates with valid reset GPIO, but with assert/deassert times
set to default, which is 0, instead of the values from DT. This breaks
PHY reset.

Fix this by checking if return value is non-zero and then for this one
single allowed non-zero return value, -ENOENT.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-02 08:35:37 +02:00
..
2010-07-12 00:14:29 -07:00
2021-02-24 16:51:49 -05:00
2021-09-28 18:50:56 +03:00
2020-12-18 20:32:21 -07:00
2021-11-12 14:18:17 -05:00
2021-07-18 21:03:57 -04:00
2021-07-07 19:52:22 -04:00
2018-07-26 14:08:21 -05:00
2021-02-15 10:16:24 -05:00
2021-10-21 08:53:55 +02:00