linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags
@ 2013-06-14 16:40 Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 1/7] " Javier Martinez Canillas
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Drivers that want to get the trigger edge/level type flags for a
given interrupt have to first call irq_get_irq_data(irq) to get
the struct irq_data and then irqd_get_trigger_type(irq_data) to
obtain the IRQ flags.

This is not only error prone but also unnecessary exposes the
struct irq_data to callers. This patch-set adds a new function
irq_get_trigger_type() to obtain the edge/level flags for an IRQ
and updates the places where irq_get_irq_data(irq) was called
just to obtain the flags from the struct irq_data.

The patch-set is composed of the following patches:

[PATCH 1/7] genirq: add irq_get_trigger_type() to get IRQ flags
[PATCH 2/7] gpio: mvebu: use irq_get_trigger_type() to get IRQ flags
[PATCH 3/7] mfd: twl4030-irq: use irq_get_trigger_type() to get IRQ flags
[PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
[PATCH 5/7] arm: orion: use irq_get_trigger_type() to get IRQ flags
[PATCH 6/7] MIPS: octeon: use irq_get_trigger_type() to get IRQ flags
[PATCH 7/7] irqdomain: use irq_get_trigger_type() to get IRQ flags

 arch/arm/plat-orion/gpio.c           |    2 +-
 arch/mips/cavium-octeon/octeon-irq.c |    2 +-
 drivers/gpio/gpio-mvebu.c            |    2 +-
 drivers/mfd/stmpe.c                  |    3 +--
 drivers/mfd/twl4030-irq.c            |    5 +----
 include/linux/irq.h                  |    6 ++++++
 kernel/irq/irqdomain.c               |    2 +-
 7 files changed, 12 insertions(+), 10 deletions(-)

Best regards,
Javier

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

* [PATCH 1/7] genirq: add irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-25  9:52   ` [tip:irq/core] genirq: Add " tip-bot for Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 2/7] gpio: mvebu: use " Javier Martinez Canillas
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Drivers that want to get the trigger edge/level type flags for a
given interrupt have to first call irq_get_irq_data(irq) to get
the struct irq_data and then irqd_get_trigger_type(irq_data) to
obtain the IRQ flags.

This is not only error prone but also unnecessary exposes the
struct irq_data to callers.

It's better to have an irq_get_trigger_type() function to obtain
the edge/level flags for an IRQ.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 include/linux/irq.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index bc4e066..0e8e3a6 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -579,6 +579,12 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
 	return d->msi_desc;
 }
 
+static inline u32 irq_get_trigger_type(unsigned int irq)
+{
+	struct irq_data *d = irq_get_irq_data(irq);
+	return d ? irqd_get_trigger_type(d) : 0;
+}
+
 int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
 		struct module *owner);
 
-- 
1.7.7.6


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

* [PATCH 2/7] gpio: mvebu: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 1/7] " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-14 18:37   ` Jason Cooper
  2013-06-25  9:52   ` [tip:irq/core] gpio: mvebu: Use " tip-bot for Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 3/7] mfd: twl4030-irq: use " Javier Martinez Canillas
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/gpio/gpio-mvebu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 3a4816a..80ad35e 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -457,7 +457,7 @@ static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 		if (!(cause & (1 << i)))
 			continue;
 
-		type = irqd_get_trigger_type(irq_get_irq_data(irq));
+		type = irq_get_trigger_type(irq);
 		if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
 			/* Swap polarity (race with GPIO line) */
 			u32 polarity;
-- 
1.7.7.6


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

* [PATCH 3/7] mfd: twl4030-irq: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 1/7] " Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 2/7] gpio: mvebu: use " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-18  8:46   ` Samuel Ortiz
  2013-06-25  9:52   ` [tip:irq/core] mfd: twl4030-irq: Use " tip-bot for Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/mfd/twl4030-irq.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index a5f9888..9d2d1ba 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -537,16 +537,13 @@ static void twl4030_sih_bus_sync_unlock(struct irq_data *data)
 		/* Modify only the bits we know must change */
 		while (edge_change) {
 			int		i = fls(edge_change) - 1;
-			struct irq_data	*idata;
 			int		byte = i >> 2;
 			int		off = (i & 0x3) * 2;
 			unsigned int	type;
 
-			idata = irq_get_irq_data(i + agent->irq_base);
-
 			bytes[byte] &= ~(0x03 << off);
 
-			type = irqd_get_trigger_type(idata);
+			type = irq_get_trigger_type(i + agent->irq_base);
 			if (type & IRQ_TYPE_EDGE_RISING)
 				bytes[byte] |= BIT(off + 1);
 			if (type & IRQ_TYPE_EDGE_FALLING)
-- 
1.7.7.6


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

* [PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
                   ` (2 preceding siblings ...)
  2013-06-14 16:40 ` [PATCH 3/7] mfd: twl4030-irq: use " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-17  9:20   ` Linus Walleij
                     ` (2 more replies)
  2013-06-14 16:40 ` [PATCH 5/7] arm: orion: " Javier Martinez Canillas
                   ` (3 subsequent siblings)
  7 siblings, 3 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/mfd/stmpe.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index bbccd51..5d5e6f9 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1208,8 +1208,7 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)
 		}
 		stmpe->variant = stmpe_noirq_variant_info[stmpe->partnum];
 	} else if (pdata->irq_trigger == IRQF_TRIGGER_NONE) {
-		pdata->irq_trigger =
-			irqd_get_trigger_type(irq_get_irq_data(stmpe->irq));
+		pdata->irq_trigger = irq_get_trigger_type(stmpe->irq);
 	}
 
 	ret = stmpe_chip_init(stmpe);
-- 
1.7.7.6


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

* [PATCH 5/7] arm: orion: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
                   ` (3 preceding siblings ...)
  2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-14 18:37   ` Jason Cooper
  2013-06-25  9:52   ` [tip:irq/core] arm: orion: Use " tip-bot for Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 6/7] MIPS: octeon: use " Javier Martinez Canillas
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/plat-orion/gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 249fe63..6816192 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -426,7 +426,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 		if (!(cause & (1 << i)))
 			continue;
 
-		type = irqd_get_trigger_type(irq_get_irq_data(irq));
+		type = irq_get_trigger_type(irq);
 		if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
 			/* Swap polarity (race with GPIO line) */
 			u32 polarity;
-- 
1.7.7.6


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

* [PATCH 6/7] MIPS: octeon: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
                   ` (4 preceding siblings ...)
  2013-06-14 16:40 ` [PATCH 5/7] arm: orion: " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-14 17:20   ` David Daney
  2013-06-25  9:53   ` [tip:irq/core] MIPS: octeon: Use " tip-bot for Javier Martinez Canillas
  2013-06-14 16:40 ` [PATCH 7/7] irqdomain: use " Javier Martinez Canillas
  2013-06-17 22:29 ` [PATCH 0/7] genirq: add " Grant Likely
  7 siblings, 2 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_desc_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/mips/cavium-octeon/octeon-irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index a22f06a..7181def 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -607,7 +607,7 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
 
 static void octeon_irq_handle_gpio(unsigned int irq, struct irq_desc *desc)
 {
-	if (irqd_get_trigger_type(irq_desc_get_irq_data(desc)) & IRQ_TYPE_EDGE_BOTH)
+	if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
 		handle_edge_irq(irq, desc);
 	else
 		handle_level_irq(irq, desc);
-- 
1.7.7.6


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

* [PATCH 7/7] irqdomain: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
                   ` (5 preceding siblings ...)
  2013-06-14 16:40 ` [PATCH 6/7] MIPS: octeon: use " Javier Martinez Canillas
@ 2013-06-14 16:40 ` Javier Martinez Canillas
  2013-06-25  9:53   ` [tip:irq/core] irqdomain: Use " tip-bot for Javier Martinez Canillas
  2013-06-17 22:29 ` [PATCH 0/7] genirq: add " Grant Likely
  7 siblings, 1 reply; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-14 16:40 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Grant Likely, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips, Javier Martinez Canillas

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_desc_get_irq_data(virq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 kernel/irq/irqdomain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 54a4d522..ff3eebb 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -698,7 +698,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
 
 	/* Set type if specified and different than the current one */
 	if (type != IRQ_TYPE_NONE &&
-	    type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
+	    type != irq_get_trigger_type(virq))
 		irq_set_irq_type(virq, type);
 	return virq;
 }
-- 
1.7.7.6


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

* Re: [PATCH 6/7] MIPS: octeon: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 6/7] MIPS: octeon: use " Javier Martinez Canillas
@ 2013-06-14 17:20   ` David Daney
  2013-06-25  9:53   ` [tip:irq/core] MIPS: octeon: Use " tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: David Daney @ 2013-06-14 17:20 UTC (permalink / raw)
  To: Javier Martinez Canillas, Ralf Baechle
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Linus Walleij,
	Samuel Ortiz, Jason Cooper, Andrew Lunn, Russell King,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On 06/14/2013 09:40 AM, Javier Martinez Canillas wrote:
> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_desc_get_irq_data(irq))
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Acked-by: David Daney <david.daney@cavium.com>

> ---
>   arch/mips/cavium-octeon/octeon-irq.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
> index a22f06a..7181def 100644
> --- a/arch/mips/cavium-octeon/octeon-irq.c
> +++ b/arch/mips/cavium-octeon/octeon-irq.c
> @@ -607,7 +607,7 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
>
>   static void octeon_irq_handle_gpio(unsigned int irq, struct irq_desc *desc)
>   {
> -	if (irqd_get_trigger_type(irq_desc_get_irq_data(desc)) & IRQ_TYPE_EDGE_BOTH)
> +	if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
>   		handle_edge_irq(irq, desc);
>   	else
>   		handle_level_irq(irq, desc);
>


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

* Re: [PATCH 2/7] gpio: mvebu: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 2/7] gpio: mvebu: use " Javier Martinez Canillas
@ 2013-06-14 18:37   ` Jason Cooper
  2013-06-25  9:52   ` [tip:irq/core] gpio: mvebu: Use " tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: Jason Cooper @ 2013-06-14 18:37 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Linus Walleij,
	Samuel Ortiz, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On Fri, Jun 14, 2013 at 06:40:44PM +0200, Javier Martinez Canillas wrote:
> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_get_irq_data(irq))
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  drivers/gpio/gpio-mvebu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

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

* Re: [PATCH 5/7] arm: orion: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 5/7] arm: orion: " Javier Martinez Canillas
@ 2013-06-14 18:37   ` Jason Cooper
  2013-06-25  9:52   ` [tip:irq/core] arm: orion: Use " tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: Jason Cooper @ 2013-06-14 18:37 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Linus Walleij,
	Samuel Ortiz, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On Fri, Jun 14, 2013 at 06:40:47PM +0200, Javier Martinez Canillas wrote:
> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_get_irq_data(irq))
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  arch/arm/plat-orion/gpio.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

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

* Re: [PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
@ 2013-06-17  9:20   ` Linus Walleij
  2013-06-18  8:45   ` Samuel Ortiz
  2013-06-25  9:52   ` [tip:irq/core] " tip-bot for Javier Martinez Canillas
  2 siblings, 0 replies; 23+ messages in thread
From: Linus Walleij @ 2013-06-17  9:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On Fri, Jun 14, 2013 at 6:40 PM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:

> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_get_irq_data(irq))
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

If you get the other patches ACKed.

Yours,
Linus Walleij

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

* Re: [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
                   ` (6 preceding siblings ...)
  2013-06-14 16:40 ` [PATCH 7/7] irqdomain: use " Javier Martinez Canillas
@ 2013-06-17 22:29 ` Grant Likely
  2013-06-25  7:11   ` Javier Martinez Canillas
  7 siblings, 1 reply; 23+ messages in thread
From: Grant Likely @ 2013-06-17 22:29 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel,
	Linux Kernel Mailing List, linux-mips

On Fri, Jun 14, 2013 at 5:40 PM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:
> Drivers that want to get the trigger edge/level type flags for a
> given interrupt have to first call irq_get_irq_data(irq) to get
> the struct irq_data and then irqd_get_trigger_type(irq_data) to
> obtain the IRQ flags.
>
> This is not only error prone but also unnecessary exposes the
> struct irq_data to callers. This patch-set adds a new function
> irq_get_trigger_type() to obtain the edge/level flags for an IRQ
> and updates the places where irq_get_irq_data(irq) was called
> just to obtain the flags from the struct irq_data.
>
> The patch-set is composed of the following patches:
>
> [PATCH 1/7] genirq: add irq_get_trigger_type() to get IRQ flags
> [PATCH 2/7] gpio: mvebu: use irq_get_trigger_type() to get IRQ flags
> [PATCH 3/7] mfd: twl4030-irq: use irq_get_trigger_type() to get IRQ flags
> [PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
> [PATCH 5/7] arm: orion: use irq_get_trigger_type() to get IRQ flags
> [PATCH 6/7] MIPS: octeon: use irq_get_trigger_type() to get IRQ flags
> [PATCH 7/7] irqdomain: use irq_get_trigger_type() to get IRQ flags

For the whole series:
Acked-by: Grant Likely <grant.likely@linaro.org>

>
>  arch/arm/plat-orion/gpio.c           |    2 +-
>  arch/mips/cavium-octeon/octeon-irq.c |    2 +-
>  drivers/gpio/gpio-mvebu.c            |    2 +-
>  drivers/mfd/stmpe.c                  |    3 +--
>  drivers/mfd/twl4030-irq.c            |    5 +----
>  include/linux/irq.h                  |    6 ++++++
>  kernel/irq/irqdomain.c               |    2 +-
>  7 files changed, 12 insertions(+), 10 deletions(-)
>
> Best regards,
> Javier

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

* Re: [PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
  2013-06-17  9:20   ` Linus Walleij
@ 2013-06-18  8:45   ` Samuel Ortiz
  2013-06-25  9:52   ` [tip:irq/core] " tip-bot for Javier Martinez Canillas
  2 siblings, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2013-06-18  8:45 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Linus Walleij,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On Fri, Jun 14, 2013 at 06:40:46PM +0200, Javier Martinez Canillas wrote:
> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_get_irq_data(irq))
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 3/7] mfd: twl4030-irq: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 3/7] mfd: twl4030-irq: use " Javier Martinez Canillas
@ 2013-06-18  8:46   ` Samuel Ortiz
  2013-06-25  9:52   ` [tip:irq/core] mfd: twl4030-irq: Use " tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: Samuel Ortiz @ 2013-06-18  8:46 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Gleixner, Ingo Molnar, Grant Likely, Linus Walleij,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel, linux-kernel,
	linux-mips

On Fri, Jun 14, 2013 at 06:40:45PM +0200, Javier Martinez Canillas wrote:
> Use irq_get_trigger_type() to get the IRQ trigger type flags
> instead calling irqd_get_trigger_type(irq_get_irq_data(irq))
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags
  2013-06-17 22:29 ` [PATCH 0/7] genirq: add " Grant Likely
@ 2013-06-25  7:11   ` Javier Martinez Canillas
  0 siblings, 0 replies; 23+ messages in thread
From: Javier Martinez Canillas @ 2013-06-25  7:11 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Grant Likely, Ingo Molnar, Linus Walleij, Samuel Ortiz,
	Jason Cooper, Andrew Lunn, Russell King, Ralf Baechle,
	Benjamin Herrenschmidt, linux-arm-kernel,
	Linux Kernel Mailing List, linux-mips

On 06/18/2013 12:29 AM, Grant Likely wrote:
> On Fri, Jun 14, 2013 at 5:40 PM, Javier Martinez Canillas
> <javier.martinez@collabora.co.uk> wrote:
>> Drivers that want to get the trigger edge/level type flags for a
>> given interrupt have to first call irq_get_irq_data(irq) to get
>> the struct irq_data and then irqd_get_trigger_type(irq_data) to
>> obtain the IRQ flags.
>>
>> This is not only error prone but also unnecessary exposes the
>> struct irq_data to callers. This patch-set adds a new function
>> irq_get_trigger_type() to obtain the edge/level flags for an IRQ
>> and updates the places where irq_get_irq_data(irq) was called
>> just to obtain the flags from the struct irq_data.
>>
>> The patch-set is composed of the following patches:
>>
>> [PATCH 1/7] genirq: add irq_get_trigger_type() to get IRQ flags
>> [PATCH 2/7] gpio: mvebu: use irq_get_trigger_type() to get IRQ flags
>> [PATCH 3/7] mfd: twl4030-irq: use irq_get_trigger_type() to get IRQ flags
>> [PATCH 4/7] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
>> [PATCH 5/7] arm: orion: use irq_get_trigger_type() to get IRQ flags
>> [PATCH 6/7] MIPS: octeon: use irq_get_trigger_type() to get IRQ flags
>> [PATCH 7/7] irqdomain: use irq_get_trigger_type() to get IRQ flags
> 
> For the whole series:
> Acked-by: Grant Likely <grant.likely@linaro.org>
> 

Hello Thomas,

Do you have any comments on this patch-set?

It has been ack'ed by a lot of people so I wonder if you could take it.

Thanks a lot and best regards,
Javier


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

* [tip:irq/core] genirq: Add irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 1/7] " Javier Martinez Canillas
@ 2013-06-25  9:52   ` tip-bot for Javier Martinez Canillas
  0 siblings, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  1f6236bfd7c38d5f9f7648fae7215e65274b9e63
Gitweb:     http://git.kernel.org/tip/1f6236bfd7c38d5f9f7648fae7215e65274b9e63
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:43 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:24 +0200

genirq: Add irq_get_trigger_type() to get IRQ flags

Drivers that want to get the trigger edge/level type flags for a given
interrupt have to call irq_get_irq_data(irq) to get the struct
irq_data and then irqd_get_trigger_type(irq_data) to obtain the IRQ
flags.

This is not only error prone but also unnecessary exposes the struct
irq_data to callers.

It's better to have an irq_get_trigger_type() function to obtain the
edge/level flags for an IRQ.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-2-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/irq.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 298a9b9..f04d3ba 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -584,6 +584,12 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d)
 	return d->msi_desc;
 }
 
+static inline u32 irq_get_trigger_type(unsigned int irq)
+{
+	struct irq_data *d = irq_get_irq_data(irq);
+	return d ? irqd_get_trigger_type(d) : 0;
+}
+
 int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
 		struct module *owner);
 

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

* [tip:irq/core] gpio: mvebu: Use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 2/7] gpio: mvebu: use " Javier Martinez Canillas
  2013-06-14 18:37   ` Jason Cooper
@ 2013-06-25  9:52   ` tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  fb90c22ab5e926bd35526f197097793cf479b254
Gitweb:     http://git.kernel.org/tip/fb90c22ab5e926bd35526f197097793cf479b254
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:44 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

gpio: mvebu: Use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-3-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/gpio/gpio-mvebu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 3a4816a..80ad35e 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -457,7 +457,7 @@ static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 		if (!(cause & (1 << i)))
 			continue;
 
-		type = irqd_get_trigger_type(irq_get_irq_data(irq));
+		type = irq_get_trigger_type(irq);
 		if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
 			/* Swap polarity (race with GPIO line) */
 			u32 polarity;

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

* [tip:irq/core] mfd: twl4030-irq: Use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 3/7] mfd: twl4030-irq: use " Javier Martinez Canillas
  2013-06-18  8:46   ` Samuel Ortiz
@ 2013-06-25  9:52   ` tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  5dbf79d496f3a9ad141dfd1ce4a9c4d7e12c9e2c
Gitweb:     http://git.kernel.org/tip/5dbf79d496f3a9ad141dfd1ce4a9c4d7e12c9e2c
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:45 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

mfd: twl4030-irq: Use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-4-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/twl4030-irq.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index a5f9888..9d2d1ba 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -537,16 +537,13 @@ static void twl4030_sih_bus_sync_unlock(struct irq_data *data)
 		/* Modify only the bits we know must change */
 		while (edge_change) {
 			int		i = fls(edge_change) - 1;
-			struct irq_data	*idata;
 			int		byte = i >> 2;
 			int		off = (i & 0x3) * 2;
 			unsigned int	type;
 
-			idata = irq_get_irq_data(i + agent->irq_base);
-
 			bytes[byte] &= ~(0x03 << off);
 
-			type = irqd_get_trigger_type(idata);
+			type = irq_get_trigger_type(i + agent->irq_base);
 			if (type & IRQ_TYPE_EDGE_RISING)
 				bytes[byte] |= BIT(off + 1);
 			if (type & IRQ_TYPE_EDGE_FALLING)

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

* [tip:irq/core] mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
  2013-06-17  9:20   ` Linus Walleij
  2013-06-18  8:45   ` Samuel Ortiz
@ 2013-06-25  9:52   ` tip-bot for Javier Martinez Canillas
  2 siblings, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  1a5595cb288411840298f25dc3d8944a90e4b5ab
Gitweb:     http://git.kernel.org/tip/1a5595cb288411840298f25dc3d8944a90e4b5ab
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:46 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

mfd: stmpe: use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-5-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/mfd/stmpe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index bbccd51..5d5e6f9 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1208,8 +1208,7 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)
 		}
 		stmpe->variant = stmpe_noirq_variant_info[stmpe->partnum];
 	} else if (pdata->irq_trigger == IRQF_TRIGGER_NONE) {
-		pdata->irq_trigger =
-			irqd_get_trigger_type(irq_get_irq_data(stmpe->irq));
+		pdata->irq_trigger = irq_get_trigger_type(stmpe->irq);
 	}
 
 	ret = stmpe_chip_init(stmpe);

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

* [tip:irq/core] arm: orion: Use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 5/7] arm: orion: " Javier Martinez Canillas
  2013-06-14 18:37   ` Jason Cooper
@ 2013-06-25  9:52   ` tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  f88704c95b5a2634eff99e2d720031555c67fe81
Gitweb:     http://git.kernel.org/tip/f88704c95b5a2634eff99e2d720031555c67fe81
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:47 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

arm: orion: Use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-6-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/arm/plat-orion/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 249fe63..6816192 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -426,7 +426,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 		if (!(cause & (1 << i)))
 			continue;
 
-		type = irqd_get_trigger_type(irq_get_irq_data(irq));
+		type = irq_get_trigger_type(irq);
 		if ((type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
 			/* Swap polarity (race with GPIO line) */
 			u32 polarity;

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

* [tip:irq/core] MIPS: octeon: Use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 6/7] MIPS: octeon: use " Javier Martinez Canillas
  2013-06-14 17:20   ` David Daney
@ 2013-06-25  9:53   ` tip-bot for Javier Martinez Canillas
  1 sibling, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, david.daney, tglx, sameo,
	linus.walleij

Commit-ID:  5ebf1f29e20de9b37937f808dc2ac8dd15311450
Gitweb:     http://git.kernel.org/tip/5ebf1f29e20de9b37937f808dc2ac8dd15311450
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:48 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

MIPS: octeon: Use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_desc_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: David Daney <david.daney@cavium.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-7-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/cavium-octeon/octeon-irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index a22f06a..7181def 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -607,7 +607,7 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
 
 static void octeon_irq_handle_gpio(unsigned int irq, struct irq_desc *desc)
 {
-	if (irqd_get_trigger_type(irq_desc_get_irq_data(desc)) & IRQ_TYPE_EDGE_BOTH)
+	if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
 		handle_edge_irq(irq, desc);
 	else
 		handle_level_irq(irq, desc);

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

* [tip:irq/core] irqdomain: Use irq_get_trigger_type() to get IRQ flags
  2013-06-14 16:40 ` [PATCH 7/7] irqdomain: use " Javier Martinez Canillas
@ 2013-06-25  9:53   ` tip-bot for Javier Martinez Canillas
  0 siblings, 0 replies; 23+ messages in thread
From: tip-bot for Javier Martinez Canillas @ 2013-06-25  9:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, jason, grant.likely, hpa, mingo, javier.martinez,
	benh, ralf, linux, andrew, tglx, sameo, linus.walleij

Commit-ID:  fbab62c5cd57a6acd9ed80903532c86897d2d560
Gitweb:     http://git.kernel.org/tip/fbab62c5cd57a6acd9ed80903532c86897d2d560
Author:     Javier Martinez Canillas <javier.martinez@collabora.co.uk>
AuthorDate: Fri, 14 Jun 2013 18:40:49 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 25 Jun 2013 11:48:25 +0200

irqdomain: Use irq_get_trigger_type() to get IRQ flags

Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_desc_get_irq_data(virq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-8-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 1db9e70..489921e 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -687,7 +687,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
 
 	/* Set type if specified and different than the current one */
 	if (type != IRQ_TYPE_NONE &&
-	    type != (irqd_get_trigger_type(irq_get_irq_data(virq))))
+	    type != irq_get_trigger_type(virq))
 		irq_set_irq_type(virq, type);
 	return virq;
 }

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

end of thread, other threads:[~2013-06-25  9:53 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-14 16:40 [PATCH 0/7] genirq: add irq_get_trigger_type() to get IRQ flags Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 1/7] " Javier Martinez Canillas
2013-06-25  9:52   ` [tip:irq/core] genirq: Add " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 2/7] gpio: mvebu: use " Javier Martinez Canillas
2013-06-14 18:37   ` Jason Cooper
2013-06-25  9:52   ` [tip:irq/core] gpio: mvebu: Use " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 3/7] mfd: twl4030-irq: use " Javier Martinez Canillas
2013-06-18  8:46   ` Samuel Ortiz
2013-06-25  9:52   ` [tip:irq/core] mfd: twl4030-irq: Use " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 4/7] mfd: stmpe: use " Javier Martinez Canillas
2013-06-17  9:20   ` Linus Walleij
2013-06-18  8:45   ` Samuel Ortiz
2013-06-25  9:52   ` [tip:irq/core] " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 5/7] arm: orion: " Javier Martinez Canillas
2013-06-14 18:37   ` Jason Cooper
2013-06-25  9:52   ` [tip:irq/core] arm: orion: Use " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 6/7] MIPS: octeon: use " Javier Martinez Canillas
2013-06-14 17:20   ` David Daney
2013-06-25  9:53   ` [tip:irq/core] MIPS: octeon: Use " tip-bot for Javier Martinez Canillas
2013-06-14 16:40 ` [PATCH 7/7] irqdomain: use " Javier Martinez Canillas
2013-06-25  9:53   ` [tip:irq/core] irqdomain: Use " tip-bot for Javier Martinez Canillas
2013-06-17 22:29 ` [PATCH 0/7] genirq: add " Grant Likely
2013-06-25  7:11   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).