]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: use GPIO descriptors in stmmac_mdio_reset
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Wed, 12 Jun 2019 19:31:15 +0000 (21:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jun 2019 02:08:40 +0000 (19:08 -0700)
commit2a4a5bf1c9ff84487dfe3e780f44504ed845a914
tree237ef62fafa7912212c1434913ff069c2c58d355
parentd4108abd7b1b02e8a391c0a14f9ce056c16323c9
net: stmmac: use GPIO descriptors in stmmac_mdio_reset

Switch stmmac_mdio_reset to use GPIO descriptors. GPIO core handles the
"snps,reset-gpio" for GPIO descriptors so we don't need to take care of
it inside the driver anymore.

The advantage of this is that we now preserve the GPIO flags which are
passed via devicetree. This is required on some newer Amlogic boards
which use an Open Drain pin for the reset GPIO. This pin can only output
a LOW signal or switch to input mode but it cannot output a HIGH signal.
There are already devicetree bindings for these special cases and GPIO
core already takes care of them but only if we use GPIO descriptors
instead of GPIO numbers.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
include/linux/stmmac.h