Thread (32 messages) 32 messages, 7 authors, 2016-05-30

Re: [PATCH RFT 1/2] phylib: add device reset GPIO support

From: Sergei Shtylyov <hidden>
Date: 2016-05-13 21:16:43
Also in: lkml, netdev

Hello.

On 05/13/2016 07:06 AM, Andrew Lunn wrote:
quoted
quoted
quoted
+	gpiod = fwnode_get_named_gpiod(&child->fwnode, "reset-gpios");
+	/* Deassert the reset signal */
+	if (!IS_ERR(gpiod))
+		gpiod_direction_output(gpiod, 0);
This is wrong I think. You must only ignore -ENODEV, all other error
   At least -ENOSYS should also be ignored (it's returned when
gpiolib is not configured), right? When does -ENODEV gets returned
(it's not easy to follow)?
quoted
codes should be passed to the caller.
   The caller doesn't care anyway...
It should do.
    Tell that to Florian. So far, everybody has been happy with 
of_mdiobus_register(). Until I had to touch this code. :-)
What if fwnode_get_named_gpiod() returns -EPROBE_DEFER
because the GPIO driver has not been loaded yet?
    Bad luck. :-)
    Seriously, I'll see what I can do but it's not a trivial case.
	Andrew
MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help