linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MTX build failure
@ 2009-08-28  7:47 Ralf Baechle
  2009-08-28  8:26 ` Florian Fainelli
  2009-08-28  8:53 ` Manuel Lauss
  0 siblings, 2 replies; 8+ messages in thread
From: Ralf Baechle @ 2009-08-28  7:47 UTC (permalink / raw)
  To: linux-mips

  CC      drivers/input/keyboard/gpio_keys.o
/home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In function ‘gpio_keys_probe’:
/home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123: error: implicit declaration of function ‘gpio_request’
/home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135: error: implicit declaration of function ‘gpio_free’
make[5]: *** [drivers/input/keyboard/gpio_keys.o] Error 1
make[4]: *** [drivers/input/keyboard] Error 2
make[3]: *** [drivers/input] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2

  Ralf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  7:47 MTX build failure Ralf Baechle
@ 2009-08-28  8:26 ` Florian Fainelli
  2009-08-28  8:53 ` Manuel Lauss
  1 sibling, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2009-08-28  8:26 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

Le Friday 28 August 2009 09:47:09 Ralf Baechle, vous avez écrit :
>   CC      drivers/input/keyboard/gpio_keys.o
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In
> function ‘gpio_keys_probe’:
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123:
> error: implicit declaration of function ‘gpio_request’
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135:
> error: implicit declaration of function ‘gpio_free’ make[5]: ***
> [drivers/input/keyboard/gpio_keys.o] Error 1
> make[4]: *** [drivers/input/keyboard] Error 2
> make[3]: *** [drivers/input] Error 2
> make[2]: *** [drivers] Error 2
> make[1]: *** [sub-make] Error 2

Will see what happens, thanks for notifying.
-- 
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  7:47 MTX build failure Ralf Baechle
  2009-08-28  8:26 ` Florian Fainelli
@ 2009-08-28  8:53 ` Manuel Lauss
  2009-08-28  9:07   ` Florian Fainelli
  2009-08-28  9:26   ` Manuel Lauss
  1 sibling, 2 replies; 8+ messages in thread
From: Manuel Lauss @ 2009-08-28  8:53 UTC (permalink / raw)
  To: Ralf Baechle, Florian Fainelli; +Cc: Linux-MIPS

Ralf Baechle wrote:
>   CC      drivers/input/keyboard/gpio_keys.o
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In function ‘gpio_keys_probe’:
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123: error: implicit declaration of function ‘gpio_request’
> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135: error: implicit declaration of function ‘gpio_free’
> make[5]: *** [drivers/input/keyboard/gpio_keys.o] Error 1
> make[4]: *** [drivers/input/keyboard] Error 2
> make[3]: *** [drivers/input] Error 2
> make[2]: *** [drivers] Error 2
> make[1]: *** [sub-make] Error 2

Either something like the patch below, or adding stubs for
gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
CONFIG_GPIOLIB=n case should fix it.

diff --git a/arch/mips/alchemy/Kconfig b/arch/mips/alchemy/Kconfig
index 1e0a6df..f0c930a 100644
--- a/arch/mips/alchemy/Kconfig
+++ b/arch/mips/alchemy/Kconfig
@@ -20,6 +20,7 @@ config MIPS_MTX1
 	select HW_HAS_PCI
 	select SOC_AU1500
 	select SYS_SUPPORTS_LITTLE_ENDIAN
+	select GPIOLIB

 config MIPS_BOSPORUS
 	bool "Alchemy Bosporus board"


	Manuel Lauss

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  8:53 ` Manuel Lauss
@ 2009-08-28  9:07   ` Florian Fainelli
  2009-08-28  9:26   ` Manuel Lauss
  1 sibling, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2009-08-28  9:07 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: Ralf Baechle, Linux-MIPS

Le Friday 28 August 2009 10:53:34 Manuel Lauss, vous avez écrit :
> Ralf Baechle wrote:
> >   CC      drivers/input/keyboard/gpio_keys.o
> > /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In
> > function ‘gpio_keys_probe’:
> > /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123:
> > error: implicit declaration of function ‘gpio_request’
> > /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135:
> > error: implicit declaration of function ‘gpio_free’ make[5]: ***
> > [drivers/input/keyboard/gpio_keys.o] Error 1
> > make[4]: *** [drivers/input/keyboard] Error 2
> > make[3]: *** [drivers/input] Error 2
> > make[2]: *** [drivers] Error 2
> > make[1]: *** [sub-make] Error 2
>
> Either something like the patch below, or adding stubs for
> gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
> CONFIG_GPIOLIB=n case should fix it.

The patch below fixes it for me, so feel free to add my:
Tested-by: Florian Fainelli <florian@openwrt.org>

>
> diff --git a/arch/mips/alchemy/Kconfig b/arch/mips/alchemy/Kconfig
> index 1e0a6df..f0c930a 100644
> --- a/arch/mips/alchemy/Kconfig
> +++ b/arch/mips/alchemy/Kconfig
> @@ -20,6 +20,7 @@ config MIPS_MTX1
>  	select HW_HAS_PCI
>  	select SOC_AU1500
>  	select SYS_SUPPORTS_LITTLE_ENDIAN
> +	select GPIOLIB
>
>  config MIPS_BOSPORUS
>  	bool "Alchemy Bosporus board"
>
>
> 	Manuel Lauss
-- 
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  8:53 ` Manuel Lauss
  2009-08-28  9:07   ` Florian Fainelli
@ 2009-08-28  9:26   ` Manuel Lauss
  2009-08-28  9:57     ` Florian Fainelli
  2009-08-28 13:14     ` Ralf Baechle
  1 sibling, 2 replies; 8+ messages in thread
From: Manuel Lauss @ 2009-08-28  9:26 UTC (permalink / raw)
  To: Ralf Baechle, Florian Fainelli; +Cc: Linux-MIPS

I wrote:
> Ralf Baechle wrote:
>>   CC      drivers/input/keyboard/gpio_keys.o
>> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In function ‘gpio_keys_probe’:
>> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123: error: implicit declaration of function ‘gpio_request’
>> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135: error: implicit declaration of function ‘gpio_free’
>> make[5]: *** [drivers/input/keyboard/gpio_keys.o] Error 1
>> make[4]: *** [drivers/input/keyboard] Error 2
>> make[3]: *** [drivers/input] Error 2
>> make[2]: *** [drivers] Error 2
>> make[1]: *** [sub-make] Error 2
> 
> Either something like the patch below, or adding stubs for
> gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
> CONFIG_GPIOLIB=n case should fix it.

Florian, Ralf, I prefer the latter approach;  saves everyone from
having to add #ifdef CONFIG_GPIOLIB around gpio_request() calls.

Here's an untested patch.  What do you think?  If it works for you, please
add it to your patchqueue!

Thanks!

---

From: Manuel Lauss <manuel.lauss@gmail.com>
Subject: [PATCH] Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n

Some drivers use gpio_request/gpio_free regardless of whether
gpiolib is actually built;  add stubs to work around the ensuing
compile failures.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
---
 arch/mips/include/asm/mach-au1x00/gpio-au1000.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
index 127d4ed..feea001 100644
--- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
+++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
@@ -578,6 +578,15 @@ static inline int irq_to_gpio(int irq)
 	return alchemy_irq_to_gpio(irq);
 }

+static inline int gpio_request(unsigned gpio, const char *label)
+{
+	return 0;
+}
+
+static inline void gpio_free(unsigned gpio)
+{
+}
+
 #endif	/* !CONFIG_ALCHEMY_GPIO_INDIRECT */


--
1.6.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  9:26   ` Manuel Lauss
@ 2009-08-28  9:57     ` Florian Fainelli
  2009-08-28 10:10       ` Manuel Lauss
  2009-08-28 13:14     ` Ralf Baechle
  1 sibling, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2009-08-28  9:57 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: Ralf Baechle, Linux-MIPS

Le Friday 28 August 2009 11:26:58 Manuel Lauss, vous avez écrit :
> I wrote:
> > Ralf Baechle wrote:
> >>   CC      drivers/input/keyboard/gpio_keys.o
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In
> >> function ‘gpio_keys_probe’:
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123:
> >> error: implicit declaration of function ‘gpio_request’
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135:
> >> error: implicit declaration of function ‘gpio_free’ make[5]: ***
> >> [drivers/input/keyboard/gpio_keys.o] Error 1
> >> make[4]: *** [drivers/input/keyboard] Error 2
> >> make[3]: *** [drivers/input] Error 2
> >> make[2]: *** [drivers] Error 2
> >> make[1]: *** [sub-make] Error 2
> >
> > Either something like the patch below, or adding stubs for
> > gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
> > CONFIG_GPIOLIB=n case should fix it.
>
> Florian, Ralf, I prefer the latter approach;  saves everyone from
> having to add #ifdef CONFIG_GPIOLIB around gpio_request() calls.
>
> Here's an untested patch.  What do you think?  If it works for you, please
> add it to your patchqueue!
>
> Thanks!
>
> ---
>
> From: Manuel Lauss <manuel.lauss@gmail.com>
> Subject: [PATCH] Alchemy: add gpio_request/gpio_free stubs for
> CONFIG_GPIOLIB=n
>
> Some drivers use gpio_request/gpio_free regardless of whether
> gpiolib is actually built;  add stubs to work around the ensuing
> compile failures.

This is better, though fixing the gpio keyboard driver might probably be a good approach.

>
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>

Tested-by: Florian Fainelli <florian@openwrt.org>

> ---
>  arch/mips/include/asm/mach-au1x00/gpio-au1000.h |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
> b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 127d4ed..feea001
> 100644
> --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
> +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h
> @@ -578,6 +578,15 @@ static inline int irq_to_gpio(int irq)
>  	return alchemy_irq_to_gpio(irq);
>  }
>
> +static inline int gpio_request(unsigned gpio, const char *label)
> +{
> +	return 0;
> +}
> +
> +static inline void gpio_free(unsigned gpio)
> +{
> +}
> +
>  #endif	/* !CONFIG_ALCHEMY_GPIO_INDIRECT */
>
>
> --
> 1.6.4.1
-- 
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  9:57     ` Florian Fainelli
@ 2009-08-28 10:10       ` Manuel Lauss
  0 siblings, 0 replies; 8+ messages in thread
From: Manuel Lauss @ 2009-08-28 10:10 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: Ralf Baechle, Linux-MIPS

On Fri, Aug 28, 2009 at 11:57 AM, Florian Fainelli<florian@openwrt.org> wrote:
> Le Friday 28 August 2009 11:26:58 Manuel Lauss, vous avez écrit :
>> I wrote:
>> > Ralf Baechle wrote:
>> >>   CC      drivers/input/keyboard/gpio_keys.o
>> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In
>> >> function ‘gpio_keys_probe’:
>> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123:
>> >> error: implicit declaration of function ‘gpio_request’
>> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135:
>> >> error: implicit declaration of function ‘gpio_free’ make[5]: ***
>> >> [drivers/input/keyboard/gpio_keys.o] Error 1
>> >> make[4]: *** [drivers/input/keyboard] Error 2
>> >> make[3]: *** [drivers/input] Error 2
>> >> make[2]: *** [drivers] Error 2
>> >> make[1]: *** [sub-make] Error 2
>> >
>> > Either something like the patch below, or adding stubs for
>> > gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
>> > CONFIG_GPIOLIB=n case should fix it.
>>
>> Florian, Ralf, I prefer the latter approach;  saves everyone from
>> having to add #ifdef CONFIG_GPIOLIB around gpio_request() calls.
>>
>> Here's an untested patch.  What do you think?  If it works for you, please
>> add it to your patchqueue!
>>
>> Thanks!
>>
>> ---
>>
>> From: Manuel Lauss <manuel.lauss@gmail.com>
>> Subject: [PATCH] Alchemy: add gpio_request/gpio_free stubs for
>> CONFIG_GPIOLIB=n
>>
>> Some drivers use gpio_request/gpio_free regardless of whether
>> gpiolib is actually built;  add stubs to work around the ensuing
>> compile failures.
>
> This is better, though fixing the gpio keyboard driver might probably be a good approach.

As I wrote above, I don't think adding "#ifdef CONFIG_GPIOLIB" to all
in-kernel users
of gpio_request() is an acceptable solution; one would be to
unconditionally enable GPIOLIB
on Alchemy (but I like speedy gpio calls to bitbang busses...),
another this patch.

Thanks for testing!
      Manuel Lauss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MTX build failure
  2009-08-28  9:26   ` Manuel Lauss
  2009-08-28  9:57     ` Florian Fainelli
@ 2009-08-28 13:14     ` Ralf Baechle
  1 sibling, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2009-08-28 13:14 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: Florian Fainelli, Linux-MIPS

On Fri, Aug 28, 2009 at 11:26:58AM +0200, Manuel Lauss wrote:

> I wrote:
> > Ralf Baechle wrote:
> >>   CC      drivers/input/keyboard/gpio_keys.o
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c: In function ‘gpio_keys_probe’:
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:123: error: implicit declaration of function ‘gpio_request’
> >> /home/ralf/src/linux/linux-mips/drivers/input/keyboard/gpio_keys.c:135: error: implicit declaration of function ‘gpio_free’
> >> make[5]: *** [drivers/input/keyboard/gpio_keys.o] Error 1
> >> make[4]: *** [drivers/input/keyboard] Error 2
> >> make[3]: *** [drivers/input] Error 2
> >> make[2]: *** [drivers] Error 2
> >> make[1]: *** [sub-make] Error 2
> > 
> > Either something like the patch below, or adding stubs for
> > gpio_request/gpio_free to asm/mach-au1x00/gpio-au1000.h in the
> > CONFIG_GPIOLIB=n case should fix it.
> 
> Florian, Ralf, I prefer the latter approach;  saves everyone from
> having to add #ifdef CONFIG_GPIOLIB around gpio_request() calls.
> 
> Here's an untested patch.  What do you think?  If it works for you, please
> add it to your patchqueue!

Thanks, this 2nd one looks good.  Applied.

  Ralf

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-28 13:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-28  7:47 MTX build failure Ralf Baechle
2009-08-28  8:26 ` Florian Fainelli
2009-08-28  8:53 ` Manuel Lauss
2009-08-28  9:07   ` Florian Fainelli
2009-08-28  9:26   ` Manuel Lauss
2009-08-28  9:57     ` Florian Fainelli
2009-08-28 10:10       ` Manuel Lauss
2009-08-28 13:14     ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).