All of lore.kernel.org
 help / color / mirror / Atom feed
* pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set
@ 2016-10-28 17:20 ` Paul Bolle
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Bolle @ 2016-10-28 17:20 UTC (permalink / raw)
  To: Linus Walleij, Matthias Brugger
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel

Hi,

0) A rather spartan build, on x86_64, which did include
drivers/pinctrl/mediatek/pinctrl-mtk-common.o failed like this:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ‘mtk_gpio_to_irq’:
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:838:8: error: implicit declaration of function ‘irq_find_mapping’ [-Werror=implicit-function-declaration]
  irq = irq_find_mapping(pctl->domain, pin->eint.eintnum);
        ^~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ‘mtk_pctrl_init’:
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1474:17: error: implicit declaration of function ‘irq_domain_add_linear’ [-Werror=implicit-function-declaration]
  pctl->domain = irq_domain_add_linear(np,
                 ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: error: ‘irq_domain_simple_ops’ undeclared (first use in this function)
   pctl->devdata->ap_num, &irq_domain_simple_ops, NULL);
                           ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: note: each undeclared identifier is reported only once for each function it appears in
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1484:14: error: implicit declaration of function ‘irq_create_mapping’ [-Werror=implicit-function-declaration]
   int virq = irq_create_mapping(pctl->domain, i);
              ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [drivers/pinctrl/mediatek/pinctrl-mtk-common.o] Error 1
make[2]: *** [drivers/pinctrl/mediatek] Error 2
make[1]: *** [drivers/pinctrl] Error 2
make: *** [drivers] Error 2

1) That build had CONFIG_COMPILE_TEST set (obviously) but
CONFIG_IRQ_DOMAIN not set.

2) This quick hack fixes that for me:

diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 419ea4d5964d..066087156dcc 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -7,6 +7,7 @@ config PINCTRL_MTK
        select GENERIC_PINCONF
        select GPIOLIB
        select OF_GPIO
+       select IRQ_DOMAIN
 
 # For ARMv7 SoCs
 config PINCTRL_MT2701

3) Would you like me to submit a proper (but lightly tested) patch or
do you prefer to fix this yourself?

Thanks,


Paul Bolle

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

* pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set
@ 2016-10-28 17:20 ` Paul Bolle
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Bolle @ 2016-10-28 17:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

0) A rather spartan build, on x86_64, which did include
drivers/pinctrl/mediatek/pinctrl-mtk-common.o failed like this:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ?mtk_gpio_to_irq?:
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:838:8: error: implicit declaration of function ?irq_find_mapping? [-Werror=implicit-function-declaration]
  irq = irq_find_mapping(pctl->domain, pin->eint.eintnum);
        ^~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ?mtk_pctrl_init?:
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1474:17: error: implicit declaration of function ?irq_domain_add_linear? [-Werror=implicit-function-declaration]
  pctl->domain = irq_domain_add_linear(np,
                 ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: error: ?irq_domain_simple_ops? undeclared (first use in this function)
   pctl->devdata->ap_num, &irq_domain_simple_ops, NULL);
                           ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: note: each undeclared identifier is reported only once for each function it appears in
drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1484:14: error: implicit declaration of function ?irq_create_mapping? [-Werror=implicit-function-declaration]
   int virq = irq_create_mapping(pctl->domain, i);
              ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [drivers/pinctrl/mediatek/pinctrl-mtk-common.o] Error 1
make[2]: *** [drivers/pinctrl/mediatek] Error 2
make[1]: *** [drivers/pinctrl] Error 2
make: *** [drivers] Error 2

1) That build had CONFIG_COMPILE_TEST set (obviously) but
CONFIG_IRQ_DOMAIN not set.

2) This quick hack fixes that for me:

diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 419ea4d5964d..066087156dcc 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -7,6 +7,7 @@ config PINCTRL_MTK
        select GENERIC_PINCONF
        select GPIOLIB
        select OF_GPIO
+       select IRQ_DOMAIN
 
 # For ARMv7 SoCs
 config PINCTRL_MT2701

3) Would you like me to submit a proper (but lightly tested) patch or
do you prefer to fix this yourself?

Thanks,


Paul Bolle

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

* Re: pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set
  2016-10-28 17:20 ` Paul Bolle
  (?)
@ 2016-10-29  8:36   ` Linus Walleij
  -1 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-10-29  8:36 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Matthias Brugger, linux-gpio, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, linux-kernel

On Fri, Oct 28, 2016 at 7:20 PM, Paul Bolle <pebolle@tiscali.nl> wrote:

> 3) Would you like me to submit a proper (but lightly tested) patch or
> do you prefer to fix this yourself?

Please send a tested patch, I'll apply it.

Thanks for finding this!

Yours,
Linus Walleij

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

* Re: pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set
@ 2016-10-29  8:36   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-10-29  8:36 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Matthias Brugger, linux-gpio, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, linux-kernel

On Fri, Oct 28, 2016 at 7:20 PM, Paul Bolle <pebolle@tiscali.nl> wrote:

> 3) Would you like me to submit a proper (but lightly tested) patch or
> do you prefer to fix this yourself?

Please send a tested patch, I'll apply it.

Thanks for finding this!

Yours,
Linus Walleij

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

* pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set
@ 2016-10-29  8:36   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-10-29  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 28, 2016 at 7:20 PM, Paul Bolle <pebolle@tiscali.nl> wrote:

> 3) Would you like me to submit a proper (but lightly tested) patch or
> do you prefer to fix this yourself?

Please send a tested patch, I'll apply it.

Thanks for finding this!

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-10-29  8:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 17:20 pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set Paul Bolle
2016-10-28 17:20 ` Paul Bolle
2016-10-29  8:36 ` Linus Walleij
2016-10-29  8:36   ` Linus Walleij
2016-10-29  8:36   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.