@@ -237,6 +237,8 @@
phy-mode = "rmii";
pinctrl-names = "default";
pinctrl-0 = <&mac1_pins_a>;
+ phy-reset-gpios = <&gpio4 13 0>;
+ phy-reset-duration = <100>;
status = "okay";
};
};
,but then we would end up doing the reset twice, since it is the same GPIO that resets
the two ethernet controllers.
drivers/gpio/gpiolib.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
@@ -122,10 +122,12 @@ static int gpio_chip_hwgpio(const struct gpio_desc *desc)
*/
static struct gpio_desc *gpio_to_desc(unsigned gpio)
{
- if (WARN(!gpio_is_valid(gpio), "invalid GPIO %d\n", gpio))
+ if (!gpio_is_valid(gpio)) {
+ pr_warn("gpiolib: invalid GPIO %d\n", gpio);
return NULL;
- else
+ } else {
return &gpio_desc[gpio];
+ }
}
/**