Skip to contentSkip to conversation

pinctrl-adi2: change irq_base from usigned int to int

PATCH In review Sonic Zhang 2 participants 2 messages Jan 28, 2014 – Jan 31, 2014 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 pinctrl-adi2: change irq_base from usigned int to int

From: Sonic Zhang <[email protected]>

Negative irq_base means there is no fixed Linux irq mappings are created from the platform data. The driver calls irq_create_mapping to allocate a virtual Linux irq.

---
v2-changes:
- reword the patch description

 drivers/pinctrl/pinctrl-adi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-adi2.c +1 -1
index e8120fa..9fb53c9 100644
@@ -173,7 +173,7 @@ struct adi_pinctrl {
 struct gpio_port {
 	struct list_head node;
 	void __iomem *base;
-	unsigned int irq_base;
+	int irq_base;
 	unsigned int width;
 	struct gpio_port_t *regs;
 	struct gpio_port_saved saved_data;
Signature · 1 line
1.8.2.3
#1 lore raw
Quoted 4 lines · Sonic Zhang

From: Sonic Zhang <[email protected]>

Negative irq_base means there is no fixed Linux irq mappings are created from the platform data. The driver calls irq_create_mapping to allocate a virtual Linux irq.

Those IRQs are not any more "virtual" than any other Linux IRQ so I don't like this way of putting things. They are dynamically allocated though.

The whole "virq" thing is just one big confusion, somehow people are under the impression that some IRQ numbers in the kernel are more "real" than others just because they happen to map 1-to-1 to a certain HW IRQ on the primary IRQ controller, but this is just pure luck. This is one reason we're trying to get rid of IRQ numbers altogether (if that will ever go anywhere).

Quoted 4 lines

---
v2-changes:
- reword the patch description

I applied v1 anyway.

Yours,
Linus Walleij