Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1293672

Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO

From Gregory CLEMENT <gregory.clement@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO
Date 2015-12-17 09:40 +0100
Message-ID <qGCgp-5m2-5@gated-at.bofh.it> (permalink)
References <qGp9v-5n4-13@gated-at.bofh.it> <qGpMd-5PL-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Arnd,
 
 On mer., déc. 16 2015, Arnd Bergmann <arnd@arndb.de> wrote:

> On Wednesday 16 December 2015 19:31:30 Gregory CLEMENT wrote:
>> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
>> index 88c1e1a..35661aa 100644
>> --- a/drivers/net/ethernet/cadence/macb.c
>> +++ b/drivers/net/ethernet/cadence/macb.c
>> @@ -28,6 +28,7 @@
>>  #include <linux/phy.h>
>>  #include <linux/of.h>
>>  #include <linux/of_device.h>
>> +#include <linux/of_gpio.h>
>>  #include <linux/of_mdio.h>
>>  #include <linux/of_net.h>
>
> Is this the patch that is already in linux-next?

I've just checked and it is the v2 which is in linux-next. David applied
it on Monday in his next branche but I was not aware of it.

David,

if I remebered well you do not remove patch from yout branch.  So would
you agree to take a follow-up patch on top of 5833e0526820 "net/macb:
add support for resetting PHY using GPIO" ?

I will fix the error found by Arnd and also use a better device tree
binding (more future proof).

Thanks,

Gregory

>
> I needed an additional
>
> #include <linux/gpio/consumer.h>
>
> to avoid this build error on randconfig builds without GPIOLIB:
>
>     drivers/net/ethernet/cadence/macb.c: In function 'macb_probe':
>     drivers/net/ethernet/cadence/macb.c:2908:19: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
>       bp->reset_gpio = devm_gpiod_get_optional(&bp->pdev->dev, "phy-reset",
>                        ^
>     drivers/net/ethernet/cadence/macb.c:2909:8: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
>             GPIOD_OUT_HIGH);
>             ^
>     drivers/net/ethernet/cadence/macb.c:2909:8: note: each undeclared identifier is reported only once for each function it appears in
>     drivers/net/ethernet/cadence/macb.c: In function 'macb_remove':
>     drivers/net/ethernet/cadence/macb.c:2979:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
>
>
> 	Arnd

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-16 19:40 +0100
  Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-16 20:10 +0100
  Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO Richard Cochran <richardcochran@gmail.com> - 2015-12-16 20:10 +0100
  Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO Arnd Bergmann <arnd@arndb.de> - 2015-12-16 20:20 +0100
    Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-17 09:40 +0100
      [PATCH] net/macb: Update device tree binding for resetting PHY using GPIO Gregory CLEMENT <gregory.clement@free-electrons.com> - 2015-12-17 11:00 +0100
        Re: [PATCH] net/macb: Update device tree binding for resetting PHY  using GPIO David Miller <davem@davemloft.net> - 2015-12-17 22:00 +0100
      Re: [PATCH v3] net/macb: add support for resetting PHY using GPIO David Miller <davem@davemloft.net> - 2015-12-17 18:00 +0100

csiph-web