mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpiolib: dump correct irq trigger type
@ 2008-08-03 13:30 Dmitry Baryshkov
  2008-08-14 22:24 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Baryshkov @ 2008-08-03 13:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dmitry Baryshkov, David Brownell

Use desc->action->flags for dumping irq flags, it is populated with
correct trigger type.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
---
 drivers/gpio/gpiolib.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index beaf6b3..a35d19d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2,6 +2,7 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/spinlock.h>
+#include <linux/interrupt.h>
 
 #include <asm/gpio.h>
 
@@ -570,7 +571,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 			if (irq >= 0 && desc->action) {
 				char *trigger;
 
-				switch (desc->status & IRQ_TYPE_SENSE_MASK) {
+				switch (desc->action->flags & IRQ_TYPE_SENSE_MASK) {
 				case IRQ_TYPE_NONE:
 					trigger = "(default)";
 					break;
-- 
1.5.6.3


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

* Re: [PATCH] gpiolib: dump correct irq trigger type
  2008-08-03 13:30 [PATCH] gpiolib: dump correct irq trigger type Dmitry Baryshkov
@ 2008-08-14 22:24 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2008-08-14 22:24 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: linux-kernel

On Sunday 03 August 2008, Dmitry Baryshkov wrote:
> Use desc->action->flags for dumping irq flags, it is populated with
> correct trigger type.

I'll NAK this ... the trigger type is actually a bit problematic,
it hasn't previously been maintained *anywhere* except possibly as
platform-specific code.  And if it were maintained, desc->status
would be the right place:  the flags for each action would otherwise
need to be updated.

However, given recent cleanups in handling of genirq triggering
I think it's time for me to submit a patch to correct that little
oversight.

- Dave


> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
> Cc: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  drivers/gpio/gpiolib.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index beaf6b3..a35d19d 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2,6 +2,7 @@
>  #include <linux/module.h>
>  #include <linux/irq.h>
>  #include <linux/spinlock.h>
> +#include <linux/interrupt.h>
>  
>  #include <asm/gpio.h>
>  
> @@ -570,7 +571,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>  			if (irq >= 0 && desc->action) {
>  				char *trigger;
>  
> -				switch (desc->status & IRQ_TYPE_SENSE_MASK) {
> +				switch (desc->action->flags & IRQ_TYPE_SENSE_MASK) {
>  				case IRQ_TYPE_NONE:
>  					trigger = "(default)";
>  					break;
> -- 
> 1.5.6.3
> 



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

end of thread, other threads:[~2008-08-14 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-03 13:30 [PATCH] gpiolib: dump correct irq trigger type Dmitry Baryshkov
2008-08-14 22:24 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®