* [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module
@ 2014-11-20 14:06 Alexander Stein
2014-11-27 7:36 ` Alexandre Courbot
2014-11-28 15:11 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Stein @ 2014-11-20 14:06 UTC (permalink / raw)
To: Linus Walleij, Alexandre Courbot; +Cc: Alexander Stein, linux-gpio
With commit 2fd36c55264926e268deb50f6de5f43fa5e490f7
("i2c: core: Map OF IRQ at probe time") it seems that there is no need
to force this driver to be compiled into the kernel.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
This is completely untested, as I lack a board capable of running a v3.18-rcX
kernel. But I noticed on an older kernel that this driver failed requesting
irq 0 during kernel boot. 0 because it's irq parent was not yet probed (also
a compiled in driver). With the mentioned commit this should work now.
It is currently only in
http://git.kernel.org/cgit/linux/kernel/git/wsa/linux.git/log/?h=i2c/for-next
drivers/gpio/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 0959ca9..29973d3 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -547,11 +547,10 @@ config GPIO_PCA953X
config GPIO_PCA953X_IRQ
bool "Interrupt controller support for PCA953x"
- depends on GPIO_PCA953X=y
select GPIOLIB_IRQCHIP
help
Say yes here to enable the pca953x to be used as an interrupt
- controller. It requires the driver to be built in the kernel.
+ controller.
config GPIO_PCF857X
tristate "PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders"
--
2.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module
2014-11-20 14:06 [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module Alexander Stein
@ 2014-11-27 7:36 ` Alexandre Courbot
2014-11-28 15:11 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Courbot @ 2014-11-27 7:36 UTC (permalink / raw)
To: Alexander Stein; +Cc: Linus Walleij, linux-gpio@vger.kernel.org
On Thu, Nov 20, 2014 at 11:06 PM, Alexander Stein
<alexander.stein@systec-electronic.com> wrote:
> With commit 2fd36c55264926e268deb50f6de5f43fa5e490f7
> ("i2c: core: Map OF IRQ at probe time") it seems that there is no need
> to force this driver to be compiled into the kernel.
>
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
> This is completely untested, as I lack a board capable of running a v3.18-rcX
> kernel. But I noticed on an older kernel that this driver failed requesting
> irq 0 during kernel boot. 0 because it's irq parent was not yet probed (also
> a compiled in driver). With the mentioned commit this should work now.
> It is currently only in
> http://git.kernel.org/cgit/linux/kernel/git/wsa/linux.git/log/?h=i2c/for-next
Looks harmless to me, but could we have a Tested-by from someone who
can try this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module
2014-11-20 14:06 [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module Alexander Stein
2014-11-27 7:36 ` Alexandre Courbot
@ 2014-11-28 15:11 ` Linus Walleij
2014-12-01 7:27 ` Alexander Stein
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2014-11-28 15:11 UTC (permalink / raw)
To: Alexander Stein; +Cc: Alexandre Courbot, linux-gpio@vger.kernel.org
On Thu, Nov 20, 2014 at 3:06 PM, Alexander Stein
<alexander.stein@systec-electronic.com> wrote:
> With commit 2fd36c55264926e268deb50f6de5f43fa5e490f7
> ("i2c: core: Map OF IRQ at probe time") it seems that there is no need
> to force this driver to be compiled into the kernel.
>
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
I don't get this at all.
> config GPIO_PCA953X_IRQ
> bool "Interrupt controller support for PCA953x"
> - depends on GPIO_PCA953X=y
> select GPIOLIB_IRQCHIP
> help
> Say yes here to enable the pca953x to be used as an interrupt
> - controller. It requires the driver to be built in the kernel.
> + controller.
Why should this *not* be dependent on GPIO_PCA953X?? The config
flag is only used inside the file that gets built by exactly that
config flag!
Just remove the "=y" part of the line and test if you like.
The dependency makes perfect sense, it'd just that removing it won't
break the build just because it's only used in that file.
> This is completely untested, as I lack a board capable of running a v3.18-rcX
> kernel. But I noticed on an older kernel that this driver failed requesting
> irq 0 during kernel boot. 0 because it's irq parent was not yet probed (also
> a compiled in driver).
If the parent is not probed, it should get an -EPROBE_DEFER
as irq number from the parent and bail out, then that is the actual bug
that needs fixing.
> With the mentioned commit this should work now.
I want it tested before I believe it...
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module
2014-11-28 15:11 ` Linus Walleij
@ 2014-12-01 7:27 ` Alexander Stein
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Stein @ 2014-12-01 7:27 UTC (permalink / raw)
To: Linus Walleij; +Cc: Alexandre Courbot, linux-gpio@vger.kernel.org
On Friday 28 November 2014 16:11:02, Linus Walleij wrote:
> On Thu, Nov 20, 2014 at 3:06 PM, Alexander Stein
> <alexander.stein@systec-electronic.com> wrote:
>
> > With commit 2fd36c55264926e268deb50f6de5f43fa5e490f7
> > ("i2c: core: Map OF IRQ at probe time") it seems that there is no need
> > to force this driver to be compiled into the kernel.
> >
> > Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
>
> I don't get this at all.
>
> > config GPIO_PCA953X_IRQ
> > bool "Interrupt controller support for PCA953x"
> > - depends on GPIO_PCA953X=y
> > select GPIOLIB_IRQCHIP
> > help
> > Say yes here to enable the pca953x to be used as an interrupt
> > - controller. It requires the driver to be built in the kernel.
> > + controller.
>
> Why should this *not* be dependent on GPIO_PCA953X?? The config
> flag is only used inside the file that gets built by exactly that
> config flag!
>
> Just remove the "=y" part of the line and test if you like.
Doh, you're right. Only the =y part should be removed.
> > This is completely untested, as I lack a board capable of running a v3.18-rcX
> > kernel. But I noticed on an older kernel that this driver failed requesting
> > irq 0 during kernel boot. 0 because it's irq parent was not yet probed (also
> > a compiled in driver).
>
> If the parent is not probed, it should get an -EPROBE_DEFER
> as irq number from the parent and bail out, then that is the actual bug
> that needs fixing.
>
> > With the mentioned commit this should work now.
>
> I want it tested before I believe it...
Sure, I'll come back when I could actually test this on a more recent kernel.
Best regards,
Alexander
--
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
Am Windrad 2
08468 Heinsdorfergrund
Tel.: 03765 38600-1156
Fax: 03765 38600-4100
Email: alexander.stein@systec-electronic.com
Website: www.systec-electronic.com
Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Chemnitz, HRB 28082
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-01 7:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 14:06 [RFC PATCH 1/1] gpio: pca953x: Allow interrupt support when compiled as module Alexander Stein
2014-11-27 7:36 ` Alexandre Courbot
2014-11-28 15:11 ` Linus Walleij
2014-12-01 7:27 ` Alexander Stein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox