All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Device Tree IRQ related enablement patches
@ 2012-08-06 10:46 ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov, sameo

This patch-set pertains to the addition of a new IRQ domain for
the DB8500-PRCMU and providing it with Interrupt Controller status
in the eyes of Device Tree. We also ensure that the Power-On-Key
driver obtains the correct IRQ when being probed with Device Tree
and otherwise.

 arch/arm/boot/dts/dbx5x0.dtsi      |    5 +++-
 drivers/input/misc/ab8500-ponkey.c |    6 ++--
 drivers/mfd/db8500-prcmu.c         |   54 +++++++++++++++++++++++++++---------
 drivers/mfd/mfd-core.c             |   10 +++++--
 include/linux/mfd/db8500-prcmu.h   |    2 ++
 5 files changed, 59 insertions(+), 18 deletions(-)


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

* [PATCH 0/6] Device Tree IRQ related enablement patches
@ 2012-08-06 10:46 ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

This patch-set pertains to the addition of a new IRQ domain for
the DB8500-PRCMU and providing it with Interrupt Controller status
in the eyes of Device Tree. We also ensure that the Power-On-Key
driver obtains the correct IRQ when being probed with Device Tree
and otherwise.

 arch/arm/boot/dts/dbx5x0.dtsi      |    5 +++-
 drivers/input/misc/ab8500-ponkey.c |    6 ++--
 drivers/mfd/db8500-prcmu.c         |   54 +++++++++++++++++++++++++++---------
 drivers/mfd/mfd-core.c             |   10 +++++--
 include/linux/mfd/db8500-prcmu.h   |    2 ++
 5 files changed, 59 insertions(+), 18 deletions(-)

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

* [PATCH 1/6] ARM: ux500: Identify the PRCMU as an interrupt controller
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

We're just about to provide the DB8500-PRCMU with its own IRQ domain,
so that its subordinate drivers can use it as an interrupt controller.
It's obligatory for all IRQ controllers to reference themselves as
such from its own node in Device Tree. This patch does just that.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 241213c..f236bb7 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -194,6 +194,8 @@
 			interrupts = <0 47 0x4>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 			ranges;
 
 			prcmu-timer-4@80157450 {
-- 
1.7.9.5


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

* [PATCH 1/6] ARM: ux500: Identify the PRCMU as an interrupt controller
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

We're just about to provide the DB8500-PRCMU with its own IRQ domain,
so that its subordinate drivers can use it as an interrupt controller.
It's obligatory for all IRQ controllers to reference themselves as
such from its own node in Device Tree. This patch does just that.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 241213c..f236bb7 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -194,6 +194,8 @@
 			interrupts = <0 47 0x4>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 			ranges;
 
 			prcmu-timer-4 at 80157450 {
-- 
1.7.9.5

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

* [PATCH 2/6] mfd: Provide the PRCMU with its own IRQ domain
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

The PRCMU has its own USB, Thermal, GPIO, Modem, HSI and RTC drivers,
amongst other things. This patch allows those subordinate devices to
use it as an interrupt controller as and when they are DT enabled.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/db8500-prcmu.c       |   54 +++++++++++++++++++++++++++++---------
 include/linux/mfd/db8500-prcmu.h |    2 ++
 2 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 7040a00..937ce3a 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -270,6 +270,8 @@ static struct {
 	struct prcmu_fw_version version;
 } fw_info;
 
+struct irq_domain *db8500_irq_domain;
+
 /*
  * This vector maps irq numbers to the bits in the bit field used in
  * communication with the PRCMU firmware.
@@ -2583,7 +2585,7 @@ static void prcmu_irq_mask(struct irq_data *d)
 
 	spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
 
-	mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
+	mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->hwirq];
 
 	spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);
 
@@ -2597,7 +2599,7 @@ static void prcmu_irq_unmask(struct irq_data *d)
 
 	spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
 
-	mb0_transfer.req.dbb_irqs |= prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
+	mb0_transfer.req.dbb_irqs |= prcmu_irq_bit[d->hwirq];
 
 	spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);
 
@@ -2637,9 +2639,43 @@ static char *fw_project_name(u8 project)
 	}
 }
 
+int db8500_irq_get_virq(int irq)
+{
+	return irq_create_mapping(db8500_irq_domain, irq);
+}
+EXPORT_SYMBOL_GPL(db8500_irq_get_virq);
+
+static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
+				irq_hw_number_t hwirq)
+{
+	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
+				handle_simple_irq);
+	set_irq_flags(virq, IRQF_VALID);
+
+	return 0;
+}
+
+static struct irq_domain_ops db8500_irq_ops = {
+        .map    = db8500_irq_map,
+        .xlate  = irq_domain_xlate_twocell,
+};
+
+static int db8500_irq_init(struct device_node *np)
+{
+	db8500_irq_domain = irq_domain_add_legacy(
+		np, NUM_PRCMU_WAKEUPS, IRQ_PRCMU_BASE,
+		0, &db8500_irq_ops, NULL);
+
+	if (!db8500_irq_domain) {
+		pr_err("Failed to create irqdomain\n");
+		return -ENOSYS;
+	}
+
+	return 0;
+}
+
 void __init db8500_prcmu_early_init(void)
 {
-	unsigned int i;
 	if (cpu_is_u8500v2()) {
 		void *tcpm_base = ioremap_nocache(U8500_PRCMU_TCPM_BASE, SZ_4K);
 
@@ -2683,16 +2719,6 @@ void __init db8500_prcmu_early_init(void)
 	init_completion(&mb5_transfer.work);
 
 	INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
-
-	/* Initalize irqs. */
-	for (i = 0; i < NUM_PRCMU_WAKEUPS; i++) {
-		unsigned int irq;
-
-		irq = IRQ_PRCMU_BASE + i;
-		irq_set_chip_and_handler(irq, &prcmu_irq_chip,
-					 handle_simple_irq);
-		set_irq_flags(irq, IRQF_VALID);
-	}
 }
 
 static void __init init_prcm_registers(void)
@@ -2999,6 +3025,8 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 		goto no_irq_return;
 	}
 
+	db8500_irq_init(np);
+
 	for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) {
 		if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) {
 			db8500_prcmu_devs[i].platform_data = ab8500_platdata;
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index b82f6ee..38494d9 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -571,6 +571,8 @@ u32 db8500_prcmu_read(unsigned int reg);
 void db8500_prcmu_write(unsigned int reg, u32 value);
 void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value);
 
+int db8500_irq_get_virq(int irq);
+
 #else /* !CONFIG_MFD_DB8500_PRCMU */
 
 static inline void db8500_prcmu_early_init(void) {}
-- 
1.7.9.5


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

* [PATCH 2/6] mfd: Provide the PRCMU with its own IRQ domain
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

The PRCMU has its own USB, Thermal, GPIO, Modem, HSI and RTC drivers,
amongst other things. This patch allows those subordinate devices to
use it as an interrupt controller as and when they are DT enabled.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/db8500-prcmu.c       |   54 +++++++++++++++++++++++++++++---------
 include/linux/mfd/db8500-prcmu.h |    2 ++
 2 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 7040a00..937ce3a 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -270,6 +270,8 @@ static struct {
 	struct prcmu_fw_version version;
 } fw_info;
 
+struct irq_domain *db8500_irq_domain;
+
 /*
  * This vector maps irq numbers to the bits in the bit field used in
  * communication with the PRCMU firmware.
@@ -2583,7 +2585,7 @@ static void prcmu_irq_mask(struct irq_data *d)
 
 	spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
 
-	mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
+	mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->hwirq];
 
 	spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);
 
@@ -2597,7 +2599,7 @@ static void prcmu_irq_unmask(struct irq_data *d)
 
 	spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
 
-	mb0_transfer.req.dbb_irqs |= prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
+	mb0_transfer.req.dbb_irqs |= prcmu_irq_bit[d->hwirq];
 
 	spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);
 
@@ -2637,9 +2639,43 @@ static char *fw_project_name(u8 project)
 	}
 }
 
+int db8500_irq_get_virq(int irq)
+{
+	return irq_create_mapping(db8500_irq_domain, irq);
+}
+EXPORT_SYMBOL_GPL(db8500_irq_get_virq);
+
+static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
+				irq_hw_number_t hwirq)
+{
+	irq_set_chip_and_handler(virq, &prcmu_irq_chip,
+				handle_simple_irq);
+	set_irq_flags(virq, IRQF_VALID);
+
+	return 0;
+}
+
+static struct irq_domain_ops db8500_irq_ops = {
+        .map    = db8500_irq_map,
+        .xlate  = irq_domain_xlate_twocell,
+};
+
+static int db8500_irq_init(struct device_node *np)
+{
+	db8500_irq_domain = irq_domain_add_legacy(
+		np, NUM_PRCMU_WAKEUPS, IRQ_PRCMU_BASE,
+		0, &db8500_irq_ops, NULL);
+
+	if (!db8500_irq_domain) {
+		pr_err("Failed to create irqdomain\n");
+		return -ENOSYS;
+	}
+
+	return 0;
+}
+
 void __init db8500_prcmu_early_init(void)
 {
-	unsigned int i;
 	if (cpu_is_u8500v2()) {
 		void *tcpm_base = ioremap_nocache(U8500_PRCMU_TCPM_BASE, SZ_4K);
 
@@ -2683,16 +2719,6 @@ void __init db8500_prcmu_early_init(void)
 	init_completion(&mb5_transfer.work);
 
 	INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
-
-	/* Initalize irqs. */
-	for (i = 0; i < NUM_PRCMU_WAKEUPS; i++) {
-		unsigned int irq;
-
-		irq = IRQ_PRCMU_BASE + i;
-		irq_set_chip_and_handler(irq, &prcmu_irq_chip,
-					 handle_simple_irq);
-		set_irq_flags(irq, IRQF_VALID);
-	}
 }
 
 static void __init init_prcm_registers(void)
@@ -2999,6 +3025,8 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 		goto no_irq_return;
 	}
 
+	db8500_irq_init(np);
+
 	for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) {
 		if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) {
 			db8500_prcmu_devs[i].platform_data = ab8500_platdata;
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index b82f6ee..38494d9 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -571,6 +571,8 @@ u32 db8500_prcmu_read(unsigned int reg);
 void db8500_prcmu_write(unsigned int reg, u32 value);
 void db8500_prcmu_write_masked(unsigned int reg, u32 mask, u32 value);
 
+int db8500_irq_get_virq(int irq);
+
 #else /* !CONFIG_MFD_DB8500_PRCMU */
 
 static inline void db8500_prcmu_early_init(void) {}
-- 
1.7.9.5

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

* [PATCH 3/6] ARM: ux500: Force AB8500 to use the GIC as its interrupt controller
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

It's understood that the AB8500 should be subordinate to the DB8500;
however, the AB8500 uses the GIC as it's interrupt controller. If
we do not specify which IRQ controller to use the default is to use
the next encountered IRQ controller as we climb the tree. This would
be the DB8500. This patch ensures the AB8500 makes use of the correct
interrupt controller.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index f236bb7..83229f7 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -313,6 +313,7 @@
 			ab8500@5 {
 				compatible = "stericsson,ab8500";
 				reg = <5>; /* mailbox 5 is i2c */
+				interrupt-parent = <&intc>;
 				interrupts = <0 40 0x4>;
 				interrupt-controller;
 				#interrupt-cells = <2>;
-- 
1.7.9.5


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

* [PATCH 3/6] ARM: ux500: Force AB8500 to use the GIC as its interrupt controller
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

It's understood that the AB8500 should be subordinate to the DB8500;
however, the AB8500 uses the GIC as it's interrupt controller. If
we do not specify which IRQ controller to use the default is to use
the next encountered IRQ controller as we climb the tree. This would
be the DB8500. This patch ensures the AB8500 makes use of the correct
interrupt controller.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index f236bb7..83229f7 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -313,6 +313,7 @@
 			ab8500 at 5 {
 				compatible = "stericsson,ab8500";
 				reg = <5>; /* mailbox 5 is i2c */
+				interrupt-parent = <&intc>;
 				interrupts = <0 40 0x4>;
 				interrupt-controller;
 				#interrupt-cells = <2>;
-- 
1.7.9.5

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

* [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

Without this patch the default behaviour is to climb the Device
Tree and use the first encountered interrupt controller. This
does not take into account if a device node has specified to use
a particular IRQ controller using the interrupt-parent property.
This patch ensures that property is adhered to.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/mfd-core.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 0c3a01c..f10f27b 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/irqdomain.h>
 #include <linux/of.h>
+#include <linux/of_irq.h>
 
 int mfd_cell_enable(struct platform_device *pdev)
 {
@@ -78,7 +79,7 @@ static int mfd_add_device(struct device *parent, int id,
 {
 	struct resource *res;
 	struct platform_device *pdev;
-	struct device_node *np = NULL;
+	struct device_node *np, *parent_node = NULL;
 	struct irq_domain *domain = NULL;
 	int ret = -ENOMEM;
 	int r;
@@ -97,7 +98,12 @@ static int mfd_add_device(struct device *parent, int id,
 		for_each_child_of_node(parent->of_node, np) {
 			if (of_device_is_compatible(np, cell->of_compatible)) {
 				pdev->dev.of_node = np;
-				domain = irq_find_host(parent->of_node);
+#ifdef CONFIG_OF
+				parent_node = of_irq_find_parent(np);
+#endif
+				if (!parent_node)
+					parent_node = parent->of_node;
+				domain = irq_find_host(parent_node);
 				break;
 			}
 		}
-- 
1.7.9.5


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

* [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

Without this patch the default behaviour is to climb the Device
Tree and use the first encountered interrupt controller. This
does not take into account if a device node has specified to use
a particular IRQ controller using the interrupt-parent property.
This patch ensures that property is adhered to.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/mfd-core.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 0c3a01c..f10f27b 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/irqdomain.h>
 #include <linux/of.h>
+#include <linux/of_irq.h>
 
 int mfd_cell_enable(struct platform_device *pdev)
 {
@@ -78,7 +79,7 @@ static int mfd_add_device(struct device *parent, int id,
 {
 	struct resource *res;
 	struct platform_device *pdev;
-	struct device_node *np = NULL;
+	struct device_node *np, *parent_node = NULL;
 	struct irq_domain *domain = NULL;
 	int ret = -ENOMEM;
 	int r;
@@ -97,7 +98,12 @@ static int mfd_add_device(struct device *parent, int id,
 		for_each_child_of_node(parent->of_node, np) {
 			if (of_device_is_compatible(np, cell->of_compatible)) {
 				pdev->dev.of_node = np;
-				domain = irq_find_host(parent->of_node);
+#ifdef CONFIG_OF
+				parent_node = of_irq_find_parent(np);
+#endif
+				if (!parent_node)
+					parent_node = parent->of_node;
+				domain = irq_find_host(parent_node);
 				break;
 			}
 		}
-- 
1.7.9.5

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

* [PATCH 5/6] ARM: ux500: Match-up compatible stings with associated MFD cell
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

Until now, we've either taken the IRQs listed in the MFD cell defined
in the AB8500 driver, or the ones in Device Tree when we probed each
AB8500 MFD device independently. However, now we make a logical choice
based on whether we're running Device Tree or not. For this to happen
we need the compatible stings in the AB8500 MFD cell and the DT to
match-up. We do that here.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 83229f7..0282353 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -355,7 +355,7 @@
 				};
 
 				ab8500-ponkey {
-					compatible = "stericsson,ab8500-ponkey";
+					compatible = "stericsson,ab8500-poweron-key";
 					interrupts = <6 0x4
 						      7 0x4>;
 					interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
-- 
1.7.9.5


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

* [PATCH 5/6] ARM: ux500: Match-up compatible stings with associated MFD cell
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

Until now, we've either taken the IRQs listed in the MFD cell defined
in the AB8500 driver, or the ones in Device Tree when we probed each
AB8500 MFD device independently. However, now we make a logical choice
based on whether we're running Device Tree or not. For this to happen
we need the compatible stings in the AB8500 MFD cell and the DT to
match-up. We do that here.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/dbx5x0.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 83229f7..0282353 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -355,7 +355,7 @@
 				};
 
 				ab8500-ponkey {
-					compatible = "stericsson,ab8500-ponkey";
+					compatible = "stericsson,ab8500-poweron-key";
 					interrupts = <6 0x4
 						      7 0x4>;
 					interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
-- 
1.7.9.5

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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
  2012-08-06 10:46 ` Lee Jones
@ 2012-08-06 10:46   ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov,
	sameo, Lee Jones

If we're booting with Device Tree enabled, we want the IRQ numbers to
be taken and translated from the Device Tree binary. If not, they
should be taken from the resource allocation defined in the AB8500 MFD
core driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/input/misc/ab8500-ponkey.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 1a1d974..afcd87f 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -47,6 +47,7 @@ static irqreturn_t ab8500_ponkey_handler(int irq, void *data)
 static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
+	struct device_node *np = pdev->dev.of_node;
 	struct ab8500_ponkey *ponkey;
 	struct input_dev *input;
 	int irq_dbf, irq_dbr;
@@ -73,8 +74,9 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
-	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
+
+	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
+	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5


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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
@ 2012-08-06 10:46   ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

If we're booting with Device Tree enabled, we want the IRQ numbers to
be taken and translated from the Device Tree binary. If not, they
should be taken from the resource allocation defined in the AB8500 MFD
core driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/input/misc/ab8500-ponkey.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
index 1a1d974..afcd87f 100644
--- a/drivers/input/misc/ab8500-ponkey.c
+++ b/drivers/input/misc/ab8500-ponkey.c
@@ -47,6 +47,7 @@ static irqreturn_t ab8500_ponkey_handler(int irq, void *data)
 static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
+	struct device_node *np = pdev->dev.of_node;
 	struct ab8500_ponkey *ponkey;
 	struct input_dev *input;
 	int irq_dbf, irq_dbr;
@@ -73,8 +74,9 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
 
 	ponkey->idev = input;
 	ponkey->ab8500 = ab8500;
-	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
-	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
+
+	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
+	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;
 
 	input->name = "AB8500 POn(PowerOn) Key";
 	input->dev.parent = &pdev->dev;
-- 
1.7.9.5

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

* Re: [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
  2012-08-06 10:46   ` Lee Jones
@ 2012-08-06 11:17     ` Linus Walleij
  -1 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2012-08-06 11:17 UTC (permalink / raw)
  To: Lee Jones, Linux Input, Dmitry Torokhov
  Cc: linux-arm-kernel, linux-kernel, STEricsson_nomadik_linux,
	linus.walleij, arnd, sameo

On Mon, Aug 6, 2012 at 12:46 PM, Lee Jones <lee.jones@linaro.org> wrote:

> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Aha that's the missing patch.
Tested-by: Linus Walleij <linus.walleij@linaro.org>

This one should be split off from the patch series and sent as a separate
fix to Dmitry as it badly needs to go into the -rc series through the input
tree.

Can't see what it is doing as part of this series, it has no relation to the
other patches.

Dmitry, you can replace my revert with this patch as soon as Lee send
it to linux-input.

Yours,
Linus Walleij

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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
@ 2012-08-06 11:17     ` Linus Walleij
  0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2012-08-06 11:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 6, 2012 at 12:46 PM, Lee Jones <lee.jones@linaro.org> wrote:

> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Aha that's the missing patch.
Tested-by: Linus Walleij <linus.walleij@linaro.org>

This one should be split off from the patch series and sent as a separate
fix to Dmitry as it badly needs to go into the -rc series through the input
tree.

Can't see what it is doing as part of this series, it has no relation to the
other patches.

Dmitry, you can replace my revert with this patch as soon as Lee send
it to linux-input.

Yours,
Linus Walleij

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

* Re: [PATCH 2/6] mfd: Provide the PRCMU with its own IRQ domain
  2012-08-06 10:46   ` Lee Jones
@ 2012-08-06 11:50     ` Arnd Bergmann
  -1 siblings, 0 replies; 28+ messages in thread
From: Arnd Bergmann @ 2012-08-06 11:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, STEricsson_nomadik_linux,
	linus.walleij, dmitry.torokhov, sameo

On Monday 06 August 2012, Lee Jones wrote:

>  
> +struct irq_domain *db8500_irq_domain;
> +
 
Should this be static?

> @@ -2583,7 +2585,7 @@ static void prcmu_irq_mask(struct irq_data *d)
>  
>         spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
>  
> -       mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
> +       mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->hwirq];
>  
>         spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);

Ah, so the hwirq number *is* used directly here, unlike what I thought
when we first discussed it. I suppose that means we don't need the
xlate function after all (and you did not add one).

	Arnd

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

* [PATCH 2/6] mfd: Provide the PRCMU with its own IRQ domain
@ 2012-08-06 11:50     ` Arnd Bergmann
  0 siblings, 0 replies; 28+ messages in thread
From: Arnd Bergmann @ 2012-08-06 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 06 August 2012, Lee Jones wrote:

>  
> +struct irq_domain *db8500_irq_domain;
> +
 
Should this be static?

> @@ -2583,7 +2585,7 @@ static void prcmu_irq_mask(struct irq_data *d)
>  
>         spin_lock_irqsave(&mb0_transfer.dbb_irqs_lock, flags);
>  
> -       mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->irq - IRQ_PRCMU_BASE];
> +       mb0_transfer.req.dbb_irqs &= ~prcmu_irq_bit[d->hwirq];
>  
>         spin_unlock_irqrestore(&mb0_transfer.dbb_irqs_lock, flags);

Ah, so the hwirq number *is* used directly here, unlike what I thought
when we first discussed it. I suppose that means we don't need the
xlate function after all (and you did not add one).

	Arnd

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

* Re: [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
  2012-08-06 10:46   ` Lee Jones
@ 2012-08-06 12:36     ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 12:36 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: STEricsson_nomadik_linux, linus.walleij, arnd, dmitry.torokhov, sameo

On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/input/misc/ab8500-ponkey.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Revoked, sent elsewhere.

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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
@ 2012-08-06 12:36     ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/input/misc/ab8500-ponkey.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Revoked, sent elsewhere.

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

* Re: [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
  2012-08-06 10:46   ` Lee Jones
@ 2012-08-06 15:54     ` Mark Brown
  -1 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2012-08-06 15:54 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, linus.walleij, arnd,
	dmitry.torokhov, STEricsson_nomadik_linux, sameo

On Mon, Aug 06, 2012 at 11:46:40AM +0100, Lee Jones wrote:

> -				domain = irq_find_host(parent->of_node);
> +#ifdef CONFIG_OF
> +				parent_node = of_irq_find_parent(np);
> +#endif

Shouldn't of_irq_find_parent() be stubbed out by the header?  Every
single user of this is going to need it.  Indeed, shouldn't we be making
irq_find_host() just do this?

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

* [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
@ 2012-08-06 15:54     ` Mark Brown
  0 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2012-08-06 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 11:46:40AM +0100, Lee Jones wrote:

> -				domain = irq_find_host(parent->of_node);
> +#ifdef CONFIG_OF
> +				parent_node = of_irq_find_parent(np);
> +#endif

Shouldn't of_irq_find_parent() be stubbed out by the header?  Every
single user of this is going to need it.  Indeed, shouldn't we be making
irq_find_host() just do this?

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

* Re: [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
  2012-08-06 10:46   ` Lee Jones
@ 2012-08-06 16:00     ` Mark Brown
  -1 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2012-08-06 16:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, linus.walleij, arnd,
	dmitry.torokhov, STEricsson_nomadik_linux, sameo

On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.

>  	ponkey->ab8500 = ab8500;
> -	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
> -	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
> +
> +	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
> +	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;

Shouldn't the irq domain be coping with this?  It seems like a massive
failure to have to do this in every single user, the irq domain should
be able to encapsulate all this stuff.

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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
@ 2012-08-06 16:00     ` Mark Brown
  0 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2012-08-06 16:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.

>  	ponkey->ab8500 = ab8500;
> -	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
> -	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
> +
> +	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
> +	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;

Shouldn't the irq domain be coping with this?  It seems like a massive
failure to have to do this in every single user, the irq domain should
be able to encapsulate all this stuff.

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

* Re: [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
  2012-08-06 15:54     ` Mark Brown
@ 2012-08-06 17:21       ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 17:21 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, linux-kernel, linus.walleij, arnd,
	dmitry.torokhov, STEricsson_nomadik_linux, sameo

On Mon, Aug 06, 2012 at 04:54:46PM +0100, Mark Brown wrote:
> On Mon, Aug 06, 2012 at 11:46:40AM +0100, Lee Jones wrote:
> 
> > -				domain = irq_find_host(parent->of_node);
> > +#ifdef CONFIG_OF
> > +				parent_node = of_irq_find_parent(np);
> > +#endif
> 
> Shouldn't of_irq_find_parent() be stubbed out by the header?  Every
> single user of this is going to need it.  Indeed, shouldn't we be making
> irq_find_host() just do this?

Sounds reasonable. I'll look into it tomorrow.
-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT
@ 2012-08-06 17:21       ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 04:54:46PM +0100, Mark Brown wrote:
> On Mon, Aug 06, 2012 at 11:46:40AM +0100, Lee Jones wrote:
> 
> > -				domain = irq_find_host(parent->of_node);
> > +#ifdef CONFIG_OF
> > +				parent_node = of_irq_find_parent(np);
> > +#endif
> 
> Shouldn't of_irq_find_parent() be stubbed out by the header?  Every
> single user of this is going to need it.  Indeed, shouldn't we be making
> irq_find_host() just do this?

Sounds reasonable. I'll look into it tomorrow.
-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
  2012-08-06 16:00     ` Mark Brown
@ 2012-08-06 17:22       ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 17:22 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, linux-kernel, linus.walleij, arnd,
	dmitry.torokhov, STEricsson_nomadik_linux, sameo

On Mon, Aug 06, 2012 at 05:00:39PM +0100, Mark Brown wrote:
> On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> > If we're booting with Device Tree enabled, we want the IRQ numbers to
> > be taken and translated from the Device Tree binary. If not, they
> > should be taken from the resource allocation defined in the AB8500 MFD
> > core driver.
> 
> >  	ponkey->ab8500 = ab8500;
> > -	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
> > -	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
> > +
> > +	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
> > +	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;
> 
> Shouldn't the irq domain be coping with this?  It seems like a massive
> failure to have to do this in every single user, the irq domain should
> be able to encapsulate all this stuff.

Already in hand.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
@ 2012-08-06 17:22       ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2012-08-06 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 05:00:39PM +0100, Mark Brown wrote:
> On Mon, Aug 06, 2012 at 11:46:42AM +0100, Lee Jones wrote:
> > If we're booting with Device Tree enabled, we want the IRQ numbers to
> > be taken and translated from the Device Tree binary. If not, they
> > should be taken from the resource allocation defined in the AB8500 MFD
> > core driver.
> 
> >  	ponkey->ab8500 = ab8500;
> > -	ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
> > -	ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
> > +
> > +	ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
> > +	ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;
> 
> Shouldn't the irq domain be coping with this?  It seems like a massive
> failure to have to do this in every single user, the irq domain should
> be able to encapsulate all this stuff.

Already in hand.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2012-08-06 17:22 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 10:46 [PATCH 0/6] Device Tree IRQ related enablement patches Lee Jones
2012-08-06 10:46 ` Lee Jones
2012-08-06 10:46 ` [PATCH 1/6] ARM: ux500: Identify the PRCMU as an interrupt controller Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 10:46 ` [PATCH 2/6] mfd: Provide the PRCMU with its own IRQ domain Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 11:50   ` Arnd Bergmann
2012-08-06 11:50     ` Arnd Bergmann
2012-08-06 10:46 ` [PATCH 3/6] ARM: ux500: Force AB8500 to use the GIC as its interrupt controller Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 10:46 ` [PATCH 4/6] mfd: Use interrupt-parent as IRQ controller if specified in DT Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 15:54   ` Mark Brown
2012-08-06 15:54     ` Mark Brown
2012-08-06 17:21     ` Lee Jones
2012-08-06 17:21       ` Lee Jones
2012-08-06 10:46 ` [PATCH 5/6] ARM: ux500: Match-up compatible stings with associated MFD cell Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 10:46 ` [PATCH 6/6] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots Lee Jones
2012-08-06 10:46   ` Lee Jones
2012-08-06 11:17   ` Linus Walleij
2012-08-06 11:17     ` Linus Walleij
2012-08-06 12:36   ` Lee Jones
2012-08-06 12:36     ` Lee Jones
2012-08-06 16:00   ` Mark Brown
2012-08-06 16:00     ` Mark Brown
2012-08-06 17:22     ` Lee Jones
2012-08-06 17:22       ` Lee Jones

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.