Skip to contentSkip to conversation

mfd: arizona: Add DT binding for irq-gpios property

PATCH In review Sebastien Jan 5 participants 5 messages Nov 3, 2015 – Nov 6, 2015 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mfd: arizona: Add DT binding for irq-gpios property

---
 Documentation/devicetree/bindings/mfd/arizona.txt | 2 ++
 drivers/mfd/arizona-core.c                        | 5 +++++
 2 files changed, 7 insertions(+)
Documentation/devicetree/bindings/mfd/arizona.txt +2 -0
index a8fee60..f9405ad 100644
@@ -46,6 +46,8 @@ Optional properties:
   - wlf,reset : GPIO specifier for the GPIO controlling /RESET
   - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
 
+  - irq-gpios : GPIO specifier for the GPIO connected to /IRQ
+
   - wlf,gpio-defaults : A list of GPIO configuration register values. Defines
     for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If
     absent, no configuration of these registers is performed. If any entry has
drivers/mfd/arizona-core.c +5 -0
index 44cfdbb..2046617 100644
@@ -814,6 +814,11 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 		count++;
 	}
 
+	arizona->pdata.irq_gpio = of_get_named_gpio(arizona->dev->of_node,
+							"irq-gpios", 0);
+	if (arizona->pdata.irq_gpio < 0)
+		arizona->pdata.irq_gpio = 0;
+
 	return 0;
 }
 
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1446559806-3315-1-git-send-email-sjan-rdvid1DuHRBWk0Htik3J/[email protected]

#2 lore raw
Quoted 1 line · Sebastien Jan

+ - irq-gpios : GPIO specifier for the GPIO connected to /IRQ

The platform data this is providing is essentially a workaround for the lack of an irq_to_gpio() function and the use of it is a workaround for the lack of level triggered IRQ emulation in genirq... do we really want this in the ABI (especially as a generic thing)?

#3 lore raw
Quoted 8 lines · Mark Brown
Quoted 1 line · Sebastien Jan

+ - irq-gpios : GPIO specifier for the GPIO connected to /IRQ

The platform data this is providing is essentially a workaround for the lack of an irq_to_gpio() function and the use of it is a workaround for the lack of level triggered IRQ emulation in genirq... do we really want this in the ABI (especially as a generic thing)?

Personally I would rather not add this to the DT unless we really had to.

Also are you sure this is necessary on your system? Specifically you only need this entry if the CODEC is connected to an IRQ line that only supports edge triggered IRQs.

Thanks,
Charles

#4 lore raw
Quoted 8 lines · Charles Keepax
Quoted 7 lines · Mark Brown
Quoted 1 line · Sebastien Jan

+ - irq-gpios : GPIO specifier for the GPIO connected to /IRQ

The platform data this is providing is essentially a workaround for the lack of an irq_to_gpio() function and the use of it is a workaround for the lack of level triggered IRQ emulation in genirq... do we really want this in the ABI (especially as a generic thing)?

Quoted 6 lines

Personally I would rather not add this to the DT unless we really had to.

Also are you sure this is necessary on your system? Specifically you only need this entry if the CODEC is connected to an IRQ line that only supports edge triggered IRQs.

Mark, Charles, thanks for pointing me to this information.

I don't have this specific constraint on my system and could finally also have it working using the regular interrupts / interrup-parent properties.

So this new binding is not required for my case. I suppose we can forget about it.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 563AF241.5030404-rdvid1DuHRBWk0Htik3J/[email protected]

#6 lore raw
Quoted 16 lines · Sebastien Jan
Quoted 8 lines · Charles Keepax
Quoted 7 lines · Mark Brown
Quoted 1 line · Sebastien Jan

+ - irq-gpios : GPIO specifier for the GPIO connected to /IRQ

The platform data this is providing is essentially a workaround for the lack of an irq_to_gpio() function and the use of it is a workaround for the lack of level triggered IRQ emulation in genirq... do we really want this in the ABI (especially as a generic thing)?

Quoted 6 lines

Personally I would rather not add this to the DT unless we really had to.

Also are you sure this is necessary on your system? Specifically you only need this entry if the CODEC is connected to an IRQ line that only supports edge triggered IRQs.

Quoted 8 lines

Mark, Charles, thanks for pointing me to this information.

I don't have this specific constraint on my system and could finally also have it working using the regular interrupts / interrup-parent properties.

So this new binding is not required for my case. I suppose we can forget about it.

My favourite kind of property. ;)

Signature · 8 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html