diff mbox

net: phy: spi_ks8995: add dependency on GPIO

Message ID 1455272306-30251-1-git-send-email-sudipm.mukherjee@gmail.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Sudip Mukherjee Feb. 12, 2016, 10:18 a.m. UTC
The builds of allmodconfig of s390, m68k, tilegx, tilepro is failing
with the error:
 drivers/net/phy/spi_ks8995.c:477:3: error: implicit declaration of function 'gpiod_set_value'
 drivers/net/phy/spi_ks8995.c:477:19: error: implicit declaration of function 'gpio_to_desc'

GPIO is now used to reset the switch so we should have a dependency on
GPIOLIB. 

Fixes: cd6f288cbaab ("net: phy: spi_ks8995: add support for resetting switch using GPIO")
Cc: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/net/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Helmut Buchsbaum Feb. 12, 2016, 12:33 p.m. UTC | #1
On 02/12/2016 11:18 AM, Sudip Mukherjee wrote:
> The builds of allmodconfig of s390, m68k, tilegx, tilepro is failing
> with the error:
>   drivers/net/phy/spi_ks8995.c:477:3: error: implicit declaration of function 'gpiod_set_value'
>   drivers/net/phy/spi_ks8995.c:477:19: error: implicit declaration of function 'gpio_to_desc'
>
> GPIO is now used to reset the switch so we should have a dependency on
> GPIOLIB.
>
> Fixes: cd6f288cbaab ("net: phy: spi_ks8995: add support for resetting switch using GPIO")
> Cc: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>   drivers/net/phy/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index f0a7702..c6a4fe1 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -261,4 +261,4 @@ endif # PHYLIB
>
>   config MICREL_KS8995MA
>   	tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
> -	depends on SPI
> +	depends on SPI && GPIOLIB
>
You're definitely right! This somehow slipped through, sorry for that!
Geert Uytterhoeven Feb. 13, 2016, 10:12 a.m. UTC | #2
On Fri, Feb 12, 2016 at 11:18 AM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> The builds of allmodconfig of s390, m68k, tilegx, tilepro is failing
> with the error:
>  drivers/net/phy/spi_ks8995.c:477:3: error: implicit declaration of function 'gpiod_set_value'
>  drivers/net/phy/spi_ks8995.c:477:19: error: implicit declaration of function 'gpio_to_desc'

Does that file include include/linux/gpio/consumer.h?
The GPIO subsystem provides dummies of these functions when CONFIG_GPIOLIB=n.

> GPIO is now used to reset the switch so we should have a dependency on
> GPIOLIB.
>
> Fixes: cd6f288cbaab ("net: phy: spi_ks8995: add support for resetting switch using GPIO")
> Cc: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/net/phy/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index f0a7702..c6a4fe1 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -261,4 +261,4 @@ endif # PHYLIB
>
>  config MICREL_KS8995MA
>         tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
> -       depends on SPI
> +       depends on SPI && GPIOLIB

I think that can become

    depends on SPI
    depends on GPIOLIB || COMPILE_TEST

after you've added the missing include.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Sudip Mukherjee Feb. 13, 2016, 2:05 p.m. UTC | #3
On Saturday 13 February 2016 03:42 PM, Geert Uytterhoeven wrote:
> On Fri, Feb 12, 2016 at 11:18 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
>> The builds of allmodconfig of s390, m68k, tilegx, tilepro is failing
>> with the error:
>>   drivers/net/phy/spi_ks8995.c:477:3: error: implicit declaration of function 'gpiod_set_value'
>>   drivers/net/phy/spi_ks8995.c:477:19: error: implicit declaration of function 'gpio_to_desc'
>
> Does that file include include/linux/gpio/consumer.h?
> The GPIO subsystem provides dummies of these functions when CONFIG_GPIOLIB=n.
>
>> GPIO is now used to reset the switch so we should have a dependency on
>> GPIOLIB.
>>
>> Fixes: cd6f288cbaab ("net: phy: spi_ks8995: add support for resetting switch using GPIO")
>> Cc: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
>> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>> ---
>>   drivers/net/phy/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
>> index f0a7702..c6a4fe1 100644
>> --- a/drivers/net/phy/Kconfig
>> +++ b/drivers/net/phy/Kconfig
>> @@ -261,4 +261,4 @@ endif # PHYLIB
>>
>>   config MICREL_KS8995MA
>>          tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
>> -       depends on SPI
>> +       depends on SPI && GPIOLIB
>
> I think that can become
>
>      depends on SPI
>      depends on GPIOLIB || COMPILE_TEST
>
> after you've added the missing include.

yes, ofcourse. Better change that what I have done. Just sent v2 after 
compile testing this change.

regards
sudip
diff mbox

Patch

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index f0a7702..c6a4fe1 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -261,4 +261,4 @@  endif # PHYLIB
 
 config MICREL_KS8995MA
 	tristate "Micrel KS8995MA 5-ports 10/100 managed Ethernet switch"
-	depends on SPI
+	depends on SPI && GPIOLIB