* [PATCH] ARM: S5P: Can handle edge interrupt handler
@ 2012-02-10 13:02 Huisung Kang
2012-02-10 20:01 ` Tomasz Figa
0 siblings, 1 reply; 3+ messages in thread
From: Huisung Kang @ 2012-02-10 13:02 UTC (permalink / raw)
To: linux-arm-kernel
From: KeyYoung Park <keyyoung.park@samsung.com>
While wake up, if external interrupt uses handle_level_irq
as handle_irq (it actually uses edge type irq), That interrupt is missed.
So, if external uses edge type irq, it should use handle_edge_irq.
Signed-off-by: KeyYoung Park <keyyoung.park@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
---
arch/arm/plat-s5p/irq-eint.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c
index c496b35..6ed395e 100644
--- a/arch/arm/plat-s5p/irq-eint.c
+++ b/arch/arm/plat-s5p/irq-eint.c
@@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type)
int shift;
u32 ctrl, mask;
u32 newvalue = 0;
+ struct irq_desc *desc = irq_to_desc(data->irq);
switch (type) {
case IRQ_TYPE_EDGE_RISING:
@@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type)
else
printk(KERN_ERR "No such irq number %d", offs);
+ if (type & IRQ_TYPE_EDGE_BOTH)
+ desc->handle_irq = handle_edge_irq;
+ else
+ desc->handle_irq = handle_level_irq;
+
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: S5P: Can handle edge interrupt handler
2012-02-10 13:02 [PATCH] ARM: S5P: Can handle edge interrupt handler Huisung Kang
@ 2012-02-10 20:01 ` Tomasz Figa
2012-02-11 2:44 ` Huisung Kang
0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Figa @ 2012-02-10 20:01 UTC (permalink / raw)
To: linux-arm-kernel
I wonder if same thing wouldn't be also needed for s3c64xx.
Also please see my comments inline.
On Friday 10 of February 2012 22:02:42 Huisung Kang wrote:
> From: KeyYoung Park <keyyoung.park@samsung.com>
>
> While wake up, if external interrupt uses handle_level_irq
> as handle_irq (it actually uses edge type irq), That interrupt is missed.
> So, if external uses edge type irq, it should use handle_edge_irq.
>
> Signed-off-by: KeyYoung Park <keyyoung.park@samsung.com>
> Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
> ---
> arch/arm/plat-s5p/irq-eint.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c
> index c496b35..6ed395e 100644
> --- a/arch/arm/plat-s5p/irq-eint.c
> +++ b/arch/arm/plat-s5p/irq-eint.c
> @@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data *data,
> unsigned int type) int shift;
> u32 ctrl, mask;
> u32 newvalue = 0;
> + struct irq_desc *desc = irq_to_desc(data->irq);
>
> switch (type) {
> case IRQ_TYPE_EDGE_RISING:
> @@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data
> *data, unsigned int type) else
> printk(KERN_ERR "No such irq number %d", offs);
>
> + if (type & IRQ_TYPE_EDGE_BOTH)
> + desc->handle_irq = handle_edge_irq;
> + else
> + desc->handle_irq = handle_level_irq;
Maybe it would be better to use __irq_set_handler_locked here instead of
touching irq_desc directly?
> +
> return 0;
> }
Regards,
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: S5P: Can handle edge interrupt handler
2012-02-10 20:01 ` Tomasz Figa
@ 2012-02-11 2:44 ` Huisung Kang
0 siblings, 0 replies; 3+ messages in thread
From: Huisung Kang @ 2012-02-11 2:44 UTC (permalink / raw)
To: linux-arm-kernel
> From: linux-samsung-soc-owner at vger.kernel.org [mailto:linux-samsung-soc-owner at vger.kernel.org] On Behalf Of Tomasz
> Figa
> Sent: Saturday, February 11, 2012 5:02 AM
> To: Huisung Kang
> Cc: linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; kgene.kim at samsung.com;
> keyyoung.park at samsung.com
> Subject: Re: [PATCH] ARM: S5P: Can handle edge interrupt handler
>
> I wonder if same thing wouldn't be also needed for s3c64xx.
>
> Also please see my comments inline.
>
> On Friday 10 of February 2012 22:02:42 Huisung Kang wrote:
> > From: KeyYoung Park <keyyoung.park@samsung.com>
> >
> > While wake up, if external interrupt uses handle_level_irq as
> > handle_irq (it actually uses edge type irq), That interrupt is missed.
> > So, if external uses edge type irq, it should use handle_edge_irq.
> >
> > Signed-off-by: KeyYoung Park <keyyoung.park@samsung.com>
> > Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
> > ---
> > arch/arm/plat-s5p/irq-eint.c | 6 ++++++
> > 1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/plat-s5p/irq-eint.c
> > b/arch/arm/plat-s5p/irq-eint.c index c496b35..6ed395e 100644
> > --- a/arch/arm/plat-s5p/irq-eint.c
> > +++ b/arch/arm/plat-s5p/irq-eint.c
> > @@ -65,6 +65,7 @@ static int s5p_irq_eint_set_type(struct irq_data
> > *data, unsigned int type) int shift;
> > u32 ctrl, mask;
> > u32 newvalue = 0;
> > + struct irq_desc *desc = irq_to_desc(data->irq);
> >
> > switch (type) {
> > case IRQ_TYPE_EDGE_RISING:
> > @@ -115,6 +116,11 @@ static int s5p_irq_eint_set_type(struct irq_data
> > *data, unsigned int type) else
> > printk(KERN_ERR "No such irq number %d", offs);
> >
> > + if (type & IRQ_TYPE_EDGE_BOTH)
> > + desc->handle_irq = handle_edge_irq;
> > + else
> > + desc->handle_irq = handle_level_irq;
>
> Maybe it would be better to use __irq_set_handler_locked here instead of touching irq_desc directly?
Thanks for your review. I will send new patch.
>
> > +
> > return 0;
> > }
>
> Regards,
> Tom
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to
> majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-11 2:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 13:02 [PATCH] ARM: S5P: Can handle edge interrupt handler Huisung Kang
2012-02-10 20:01 ` Tomasz Figa
2012-02-11 2:44 ` Huisung Kang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox