]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdio: switch to using gpiod_get_optional()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 13 Sep 2019 22:55:47 +0000 (15:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 14:25:16 +0000 (16:25 +0200)
commit0e8e90dcd372ce0aa979eee84625e8f4a9d1600f
tree7e374aed7904f262bae17fc8fcae28e073eb9d2f
parentbfeb55162d8815b0fec33d33fa6da68f12f43aab
net: mdio: switch to using gpiod_get_optional()

The MDIO device reset line is optional and now that gpiod_get_optional()
returns proper value when GPIO support is compiled out, there is no
reason to use fwnode_get_named_gpiod() that I plan to hide away.

Let's switch to using more standard gpiod_get_optional() and
gpiod_set_consumer_name() to keep the nice "PHY reset" label.

Also there is no reason to only try to fetch the reset GPIO when we have
OF node, gpiolib can fetch GPIO data from firmwares as well.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c