devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property
@ 2015-11-03 14:10 Sebastien Jan
       [not found] ` <1446559806-3315-1-git-send-email-sjan-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Jan @ 2015-11-03 14:10 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, Mark Brown
  Cc: devicetree, alsa-devel, patches, Sebastien Jan

Signed-off-by: Sebastien Jan <sjan@baylibre.com>
---
 Documentation/devicetree/bindings/mfd/arizona.txt | 2 ++
 drivers/mfd/arizona-core.c                        | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index a8fee60..f9405ad 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -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
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 44cfdbb..2046617 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -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;
 }
 
-- 
1.9.1

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

* Re: [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property
       [not found] ` <1446559806-3315-1-git-send-email-sjan-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2015-11-03 15:04   ` Mark Brown
  2015-11-03 16:52     ` Charles Keepax
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2015-11-03 15:04 UTC (permalink / raw)
  To: Sebastien Jan
  Cc: Samuel Ortiz, Lee Jones,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On Tue, Nov 03, 2015 at 03:10:06PM +0100, Sebastien Jan wrote:

> +  - 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)?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property
  2015-11-03 15:04   ` Mark Brown
@ 2015-11-03 16:52     ` Charles Keepax
  2015-11-05  6:08       ` Sebastien Jan
  0 siblings, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2015-11-03 16:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: devicetree, alsa-devel, Samuel Ortiz, Sebastien Jan, patches,
	Lee Jones

On Tue, Nov 03, 2015 at 03:04:50PM +0000, Mark Brown wrote:
> On Tue, Nov 03, 2015 at 03:10:06PM +0100, Sebastien Jan wrote:
> 
> > +  - 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

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

* Re: [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property
  2015-11-03 16:52     ` Charles Keepax
@ 2015-11-05  6:08       ` Sebastien Jan
       [not found]         ` <563AF241.5030404-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Jan @ 2015-11-05  6:08 UTC (permalink / raw)
  To: Charles Keepax, Mark Brown
  Cc: Samuel Ortiz, Lee Jones,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 03/11/2015 17:52, Charles Keepax wrote:
> On Tue, Nov 03, 2015 at 03:04:50PM +0000, Mark Brown wrote:
>> On Tue, Nov 03, 2015 at 03:10:06PM +0100, Sebastien Jan wrote:
>>
>>> +  - 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.

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property
       [not found]         ` <563AF241.5030404-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2015-11-06  9:49           ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2015-11-06  9:49 UTC (permalink / raw)
  To: Sebastien Jan
  Cc: Charles Keepax, Mark Brown, Samuel Ortiz,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, 05 Nov 2015, Sebastien Jan wrote:

> On 03/11/2015 17:52, Charles Keepax wrote:
> >On Tue, Nov 03, 2015 at 03:04:50PM +0000, Mark Brown wrote:
> >>On Tue, Nov 03, 2015 at 03:10:06PM +0100, Sebastien Jan wrote:
> >>
> >>>+  - 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.
> 
> 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. ;)

-- 
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-11-06  9:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 14:10 [PATCH v2] mfd: arizona: Add DT binding for irq-gpios property Sebastien Jan
     [not found] ` <1446559806-3315-1-git-send-email-sjan-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2015-11-03 15:04   ` Mark Brown
2015-11-03 16:52     ` Charles Keepax
2015-11-05  6:08       ` Sebastien Jan
     [not found]         ` <563AF241.5030404-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2015-11-06  9:49           ` Lee Jones

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).