All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: Passing GPIO irq edge/level flags from devicetree to driver, how?
Date: Fri, 6 Jul 2012 16:16:53 +0800	[thread overview]
Message-ID: <20120706081651.GC22133@S2101-09.ap.freescale.net> (raw)
In-Reply-To: <20120706075434.GE30009@pengutronix.de>

Hi Sascha,

Try to change the value of #interrupt-cells under gpio node from 1 to 2.

I forgot updating imx on this.

Regards,
Shawn

On Fri, Jul 06, 2012 at 09:54:34AM +0200, Sascha Hauer wrote:
> Hi All,
> 
> Several gpio binding documents like the one for mxs have the following
> in them:
> 
> - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
>   The second cell bits[3:0] is used to specify trigger type and level flags:
>       1 = low-to-high edge triggered.
>       2 = high-to-low edge triggered.
>       4 = active high level-sensitive.
>       8 = active low level-sensitive.
> 
> Does anybody know where this information is evaluated and how this is
> passed to the driver?
> 
> I am working on i.MX (who would have guessed that) and I am trying to
> connect a I2C device with an interrupt source connected to the gpio
> interrupt controller. It works fine, only the irq level/edge flags
> get lost somewhere.
> 
> What I have is:
> 
> 	maxtouch at 4b {
> 		compatible = "mXT224";
> 		reg = <0x4b>;
> 		interrupt-parent = <&gpio7>;
> 		interrupts = <13 2>;
> 	};
> 
> Any idea how the maxtouch driver can use the 'high-to-low edge
> triggered' information?
> 
> BTW. the i.MX GPIO binding document does not claim to support the flags,
> but I assume it's just missing in the document, but there maybe also
> something missing in the driver to support this.
> 
> Sascha
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-07-06  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06  7:54 Passing GPIO irq edge/level flags from devicetree to driver, how? Sascha Hauer
2012-07-06  8:16 ` Shawn Guo [this message]
2012-07-06 10:36   ` Sascha Hauer
2012-07-06 11:43     ` Shawn Guo
2012-07-06 12:08 ` [PATCH] ARM: dts: imx: update #interrupt-cells for gpio nodes Shawn Guo
2012-07-06 12:38   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120706081651.GC22133@S2101-09.ap.freescale.net \
    --to=shawn.guo@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.