* [PATCH] gpio: lpc32xx: disable broken to_irq support
@ 2016-05-11 17:40 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-05-11 17:40 UTC (permalink / raw)
To: vz, linus.walleij, gnurou; +Cc: linux-arm-kernel, linux-gpio
From: Sylvain Lemieux <slemieux@tycoint.com>
The "to_irq" functionality is broken inside this driver since commit
76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
The addition of the new lpc32xx irqchip driver in 4.7, fixed the
lpc32xx platform interrupt issue.
When switching to the new lpc32xx irqchip driver, a warning appear
in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
To remove this warning (temporary solution), this patch
disables the broken "to_irq" mapping functionality support.
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
Note:
* For details on the lpc32xx irqchip patch, refer to:
http://thread.gmane.org/gmane.linux.drivers.devicetree/165620
* The final solution is to replace the existing lpc32xx gpio driver.
This work is currently in progress; refer to the following URL:
http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
drivers/gpio/gpio-lpc32xx.c | 48 +--------------------------------------------
1 file changed, 1 insertion(+), 47 deletions(-)
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index d39014d..fc5f197 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -29,7 +29,6 @@
#include <mach/hardware.h>
#include <mach/platform.h>
-#include <mach/irqs.h>
#define LPC32XX_GPIO_P3_INP_STATE _GPREG(0x000)
#define LPC32XX_GPIO_P3_OUTP_SET _GPREG(0x004)
@@ -371,61 +370,16 @@ static int lpc32xx_gpio_request(struct gpio_chip *chip, unsigned pin)
static int lpc32xx_gpio_to_irq_p01(struct gpio_chip *chip, unsigned offset)
{
- return IRQ_LPC32XX_P0_P1_IRQ;
+ return -ENXIO;
}
-static const char lpc32xx_gpio_to_irq_gpio_p3_table[] = {
- IRQ_LPC32XX_GPIO_00,
- IRQ_LPC32XX_GPIO_01,
- IRQ_LPC32XX_GPIO_02,
- IRQ_LPC32XX_GPIO_03,
- IRQ_LPC32XX_GPIO_04,
- IRQ_LPC32XX_GPIO_05,
-};
-
static int lpc32xx_gpio_to_irq_gpio_p3(struct gpio_chip *chip, unsigned offset)
{
- if (offset < ARRAY_SIZE(lpc32xx_gpio_to_irq_gpio_p3_table))
- return lpc32xx_gpio_to_irq_gpio_p3_table[offset];
return -ENXIO;
}
-static const char lpc32xx_gpio_to_irq_gpi_p3_table[] = {
- IRQ_LPC32XX_GPI_00,
- IRQ_LPC32XX_GPI_01,
- IRQ_LPC32XX_GPI_02,
- IRQ_LPC32XX_GPI_03,
- IRQ_LPC32XX_GPI_04,
- IRQ_LPC32XX_GPI_05,
- IRQ_LPC32XX_GPI_06,
- IRQ_LPC32XX_GPI_07,
- IRQ_LPC32XX_GPI_08,
- IRQ_LPC32XX_GPI_09,
- -ENXIO, /* 10 */
- -ENXIO, /* 11 */
- -ENXIO, /* 12 */
- -ENXIO, /* 13 */
- -ENXIO, /* 14 */
- -ENXIO, /* 15 */
- -ENXIO, /* 16 */
- -ENXIO, /* 17 */
- -ENXIO, /* 18 */
- IRQ_LPC32XX_GPI_19,
- -ENXIO, /* 20 */
- -ENXIO, /* 21 */
- -ENXIO, /* 22 */
- -ENXIO, /* 23 */
- -ENXIO, /* 24 */
- -ENXIO, /* 25 */
- -ENXIO, /* 26 */
- -ENXIO, /* 27 */
- IRQ_LPC32XX_GPI_28,
-};
-
static int lpc32xx_gpio_to_irq_gpi_p3(struct gpio_chip *chip, unsigned offset)
{
- if (offset < ARRAY_SIZE(lpc32xx_gpio_to_irq_gpi_p3_table))
- return lpc32xx_gpio_to_irq_gpi_p3_table[offset];
return -ENXIO;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] gpio: lpc32xx: disable broken to_irq support
@ 2016-05-11 17:40 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-05-11 17:40 UTC (permalink / raw)
To: linux-arm-kernel
From: Sylvain Lemieux <slemieux@tycoint.com>
The "to_irq" functionality is broken inside this driver since commit
76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
The addition of the new lpc32xx irqchip driver in 4.7, fixed the
lpc32xx platform interrupt issue.
When switching to the new lpc32xx irqchip driver, a warning appear
in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
To remove this warning (temporary solution), this patch
disables the broken "to_irq" mapping functionality support.
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
Note:
* For details on the lpc32xx irqchip patch, refer to:
http://thread.gmane.org/gmane.linux.drivers.devicetree/165620
* The final solution is to replace the existing lpc32xx gpio driver.
This work is currently in progress; refer to the following URL:
http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
drivers/gpio/gpio-lpc32xx.c | 48 +--------------------------------------------
1 file changed, 1 insertion(+), 47 deletions(-)
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index d39014d..fc5f197 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -29,7 +29,6 @@
#include <mach/hardware.h>
#include <mach/platform.h>
-#include <mach/irqs.h>
#define LPC32XX_GPIO_P3_INP_STATE _GPREG(0x000)
#define LPC32XX_GPIO_P3_OUTP_SET _GPREG(0x004)
@@ -371,61 +370,16 @@ static int lpc32xx_gpio_request(struct gpio_chip *chip, unsigned pin)
static int lpc32xx_gpio_to_irq_p01(struct gpio_chip *chip, unsigned offset)
{
- return IRQ_LPC32XX_P0_P1_IRQ;
+ return -ENXIO;
}
-static const char lpc32xx_gpio_to_irq_gpio_p3_table[] = {
- IRQ_LPC32XX_GPIO_00,
- IRQ_LPC32XX_GPIO_01,
- IRQ_LPC32XX_GPIO_02,
- IRQ_LPC32XX_GPIO_03,
- IRQ_LPC32XX_GPIO_04,
- IRQ_LPC32XX_GPIO_05,
-};
-
static int lpc32xx_gpio_to_irq_gpio_p3(struct gpio_chip *chip, unsigned offset)
{
- if (offset < ARRAY_SIZE(lpc32xx_gpio_to_irq_gpio_p3_table))
- return lpc32xx_gpio_to_irq_gpio_p3_table[offset];
return -ENXIO;
}
-static const char lpc32xx_gpio_to_irq_gpi_p3_table[] = {
- IRQ_LPC32XX_GPI_00,
- IRQ_LPC32XX_GPI_01,
- IRQ_LPC32XX_GPI_02,
- IRQ_LPC32XX_GPI_03,
- IRQ_LPC32XX_GPI_04,
- IRQ_LPC32XX_GPI_05,
- IRQ_LPC32XX_GPI_06,
- IRQ_LPC32XX_GPI_07,
- IRQ_LPC32XX_GPI_08,
- IRQ_LPC32XX_GPI_09,
- -ENXIO, /* 10 */
- -ENXIO, /* 11 */
- -ENXIO, /* 12 */
- -ENXIO, /* 13 */
- -ENXIO, /* 14 */
- -ENXIO, /* 15 */
- -ENXIO, /* 16 */
- -ENXIO, /* 17 */
- -ENXIO, /* 18 */
- IRQ_LPC32XX_GPI_19,
- -ENXIO, /* 20 */
- -ENXIO, /* 21 */
- -ENXIO, /* 22 */
- -ENXIO, /* 23 */
- -ENXIO, /* 24 */
- -ENXIO, /* 25 */
- -ENXIO, /* 26 */
- -ENXIO, /* 27 */
- IRQ_LPC32XX_GPI_28,
-};
-
static int lpc32xx_gpio_to_irq_gpi_p3(struct gpio_chip *chip, unsigned offset)
{
- if (offset < ARRAY_SIZE(lpc32xx_gpio_to_irq_gpi_p3_table))
- return lpc32xx_gpio_to_irq_gpi_p3_table[offset];
return -ENXIO;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: lpc32xx: disable broken to_irq support
2016-05-11 17:40 ` Sylvain Lemieux
@ 2016-05-11 19:58 ` Vladimir Zapolskiy
-1 siblings, 0 replies; 8+ messages in thread
From: Vladimir Zapolskiy @ 2016-05-11 19:58 UTC (permalink / raw)
To: Sylvain Lemieux, Linus Walleij, Alexandre Courbot
Cc: linux-arm-kernel, linux-gpio
Hi Sylvain,
On 11.05.2016 20:40, Sylvain Lemieux wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
>
> The "to_irq" functionality is broken inside this driver since commit
> 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
>
> The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> lpc32xx platform interrupt issue.
>
> When switching to the new lpc32xx irqchip driver, a warning appear
> in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
>
> To remove this warning (temporary solution), this patch
> disables the broken "to_irq" mapping functionality support.
>
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> ---
> Note:
> * For details on the lpc32xx irqchip patch, refer to:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/165620
>
> * The final solution is to replace the existing lpc32xx gpio driver.
> This work is currently in progress; refer to the following URL:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
>
> drivers/gpio/gpio-lpc32xx.c | 48 +--------------------------------------------
> 1 file changed, 1 insertion(+), 47 deletions(-)
>
the change looks good to me.
Probably all lpc32xx_gpio_to_irq* functions can be removed along with .to_irq
callback assignments, but it is up to you.
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
--
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gpio: lpc32xx: disable broken to_irq support
@ 2016-05-11 19:58 ` Vladimir Zapolskiy
0 siblings, 0 replies; 8+ messages in thread
From: Vladimir Zapolskiy @ 2016-05-11 19:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sylvain,
On 11.05.2016 20:40, Sylvain Lemieux wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
>
> The "to_irq" functionality is broken inside this driver since commit
> 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
>
> The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> lpc32xx platform interrupt issue.
>
> When switching to the new lpc32xx irqchip driver, a warning appear
> in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
>
> To remove this warning (temporary solution), this patch
> disables the broken "to_irq" mapping functionality support.
>
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> ---
> Note:
> * For details on the lpc32xx irqchip patch, refer to:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/165620
>
> * The final solution is to replace the existing lpc32xx gpio driver.
> This work is currently in progress; refer to the following URL:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
>
> drivers/gpio/gpio-lpc32xx.c | 48 +--------------------------------------------
> 1 file changed, 1 insertion(+), 47 deletions(-)
>
the change looks good to me.
Probably all lpc32xx_gpio_to_irq* functions can be removed along with .to_irq
callback assignments, but it is up to you.
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
--
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: lpc32xx: disable broken to_irq support
2016-05-11 17:40 ` Sylvain Lemieux
@ 2016-05-24 10:57 ` Linus Walleij
-1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2016-05-24 10:57 UTC (permalink / raw)
To: Sylvain Lemieux
Cc: Vladimir Zapolskiy, Alexandre Courbot, linux-arm-kernel, linux-gpio
On Wed, May 11, 2016 at 7:40 PM, Sylvain Lemieux
<slemieux.tyco@gmail.com> wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
>
> The "to_irq" functionality is broken inside this driver since commit
> 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
>
> The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> lpc32xx platform interrupt issue.
>
> When switching to the new lpc32xx irqchip driver, a warning appear
> in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
>
> To remove this warning (temporary solution), this patch
> disables the broken "to_irq" mapping functionality support.
>
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Patch applied for fixes with Vladimir's ACK.
> * The final solution is to replace the existing lpc32xx gpio driver.
> This work is currently in progress; refer to the following URL:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
Hm, I see that the ambition was to merge the new irqchip
driver and the new GPIO driver in the same merge window.
Sorry if I was being too lazy/picky/whatever about the patch(es)
I guess I didn't quite get the scope of this change. :(
I should say that as long as we can agree that the new code
makes the kernel as a whole a better place, I am happy to
merge it. Sometimes also I need to zoom out from the GPIO
and pin control subsystem(s) and see the big picture.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gpio: lpc32xx: disable broken to_irq support
@ 2016-05-24 10:57 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2016-05-24 10:57 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 11, 2016 at 7:40 PM, Sylvain Lemieux
<slemieux.tyco@gmail.com> wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
>
> The "to_irq" functionality is broken inside this driver since commit
> 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
>
> The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> lpc32xx platform interrupt issue.
>
> When switching to the new lpc32xx irqchip driver, a warning appear
> in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
>
> To remove this warning (temporary solution), this patch
> disables the broken "to_irq" mapping functionality support.
>
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Patch applied for fixes with Vladimir's ACK.
> * The final solution is to replace the existing lpc32xx gpio driver.
> This work is currently in progress; refer to the following URL:
> http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
Hm, I see that the ambition was to merge the new irqchip
driver and the new GPIO driver in the same merge window.
Sorry if I was being too lazy/picky/whatever about the patch(es)
I guess I didn't quite get the scope of this change. :(
I should say that as long as we can agree that the new code
makes the kernel as a whole a better place, I am happy to
merge it. Sometimes also I need to zoom out from the GPIO
and pin control subsystem(s) and see the big picture.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: lpc32xx: disable broken to_irq support
2016-05-24 10:57 ` Linus Walleij
@ 2016-05-24 12:54 ` Sylvain Lemieux
-1 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-05-24 12:54 UTC (permalink / raw)
To: Linus Walleij
Cc: Vladimir Zapolskiy, Alexandre Courbot, linux-arm-kernel, linux-gpio
Hi Linus,
On Tue, 2016-05-24 at 12:57 +0200, Linus Walleij wrote:
> On Wed, May 11, 2016 at 7:40 PM, Sylvain Lemieux
> <slemieux.tyco@gmail.com> wrote:
>
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> >
> > The "to_irq" functionality is broken inside this driver since commit
> > 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
> >
> > The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> > lpc32xx platform interrupt issue.
> >
> > When switching to the new lpc32xx irqchip driver, a warning appear
> > in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
> >
> > To remove this warning (temporary solution), this patch
> > disables the broken "to_irq" mapping functionality support.
> >
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
>
> Patch applied for fixes with Vladimir's ACK.
>
> > * The final solution is to replace the existing lpc32xx gpio driver.
> > This work is currently in progress; refer to the following URL:
> > http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
>
> Hm, I see that the ambition was to merge the new irqchip
> driver and the new GPIO driver in the same merge window.
> Sorry if I was being too lazy/picky/whatever about the patch(es)
> I guess I didn't quite get the scope of this change. :(
>
The new LPC32xx GPIO driver can go in a separate merge window;
another version of the patchset is required.
For 4.7, the goal was to remove the broken dependency in the
existing driver.
> I should say that as long as we can agree that the new code
> makes the kernel as a whole a better place, I am happy to
> merge it. Sometimes also I need to zoom out from the GPIO
> and pin control subsystem(s) and see the big picture.
>
> Yours,
> Linus Walleij
Sylvain Lemieux
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gpio: lpc32xx: disable broken to_irq support
@ 2016-05-24 12:54 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-05-24 12:54 UTC (permalink / raw)
To: linux-arm-kernel
Hi Linus,
On Tue, 2016-05-24 at 12:57 +0200, Linus Walleij wrote:
> On Wed, May 11, 2016 at 7:40 PM, Sylvain Lemieux
> <slemieux.tyco@gmail.com> wrote:
>
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> >
> > The "to_irq" functionality is broken inside this driver since commit
> > 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler").
> >
> > The addition of the new lpc32xx irqchip driver in 4.7, fixed the
> > lpc32xx platform interrupt issue.
> >
> > When switching to the new lpc32xx irqchip driver, a warning appear
> > in the lpc32xx gpio driver: warning: "NR_IRQS" redefined.
> >
> > To remove this warning (temporary solution), this patch
> > disables the broken "to_irq" mapping functionality support.
> >
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
>
> Patch applied for fixes with Vladimir's ACK.
>
> > * The final solution is to replace the existing lpc32xx gpio driver.
> > This work is currently in progress; refer to the following URL:
> > http://thread.gmane.org/gmane.linux.drivers.devicetree/144696
>
> Hm, I see that the ambition was to merge the new irqchip
> driver and the new GPIO driver in the same merge window.
> Sorry if I was being too lazy/picky/whatever about the patch(es)
> I guess I didn't quite get the scope of this change. :(
>
The new LPC32xx GPIO driver can go in a separate merge window;
another version of the patchset is required.
For 4.7, the goal was to remove the broken dependency in the
existing driver.
> I should say that as long as we can agree that the new code
> makes the kernel as a whole a better place, I am happy to
> merge it. Sometimes also I need to zoom out from the GPIO
> and pin control subsystem(s) and see the big picture.
>
> Yours,
> Linus Walleij
Sylvain Lemieux
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-05-24 12:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 17:40 [PATCH] gpio: lpc32xx: disable broken to_irq support Sylvain Lemieux
2016-05-11 17:40 ` Sylvain Lemieux
2016-05-11 19:58 ` Vladimir Zapolskiy
2016-05-11 19:58 ` Vladimir Zapolskiy
2016-05-24 10:57 ` Linus Walleij
2016-05-24 10:57 ` Linus Walleij
2016-05-24 12:54 ` Sylvain Lemieux
2016-05-24 12:54 ` Sylvain Lemieux
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.