On Fri, Oct 04, 2019 at 03:53:32PM +0200, Andrea Merello wrote: > mdio_device_reset() makes use of the atomic-pretending API flavor for > handling the PHY reset GPIO line. > > I found no hint that mdio_device_reset() is called from atomic context > and indeed it uses usleep_range() since long time, so I would assume that > it is OK to sleep there. > > This patch switch to gpiod_set_value_cansleep() in mdio_device_reset(). > This is relevant if e.g. the PHY reset line is tied to a I2C GPIO > controller. > > This has been tested on a ZynqMP board running an upstream 4.19 kernel and > then hand-ported on current kernel tree. > > Signed-off-by: Andrea Merello <andrea.mere...@gmail.com>
Yes, all the other bits of code using GPIOs are using the _cansleep versions. Reviewed-by: Andrew Lunn <and...@lunn.ch> Andrew