devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sean Cross <xobs@kosagi.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Randy Dunlap <rdunlap@infradead.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, bunnie@kosagi.com
Subject: Re: [PATCH v2 1/2] mfd: stmpe: support gpio over irq under device tree
Date: Mon, 15 Sep 2014 16:12:43 -0700	[thread overview]
Message-ID: <20140915231243.GL25162@lee--X1> (raw)
In-Reply-To: <1410491914-23378-2-git-send-email-xobs@kosagi.com>

On Fri, 12 Sep 2014, Sean Cross wrote:

> The stmpe_platform_data has a irq_over_gpio field, which allows the
> system to read STMPE events whenever an IRQ occurs on a GPIO pin.
> This patch adds the ability to configure this field and to use a GPIO
> as an IRQ source for boards configuring the STMPE in device tree.
> 
> Signed-off-by: Sean Cross <xobs@kosagi.com>
> ---
>  drivers/mfd/stmpe.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 3b6bfa7..4c42b05 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -1122,7 +1122,12 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,
>  	if (pdata->id < 0)
>  		pdata->id = -1;
>  
> -	pdata->irq_trigger = IRQF_TRIGGER_NONE;
> +	pdata->irq_gpio = of_get_named_gpio_flags(np, "irq-gpio", 0,
> +				&pdata->irq_trigger);
> +	if (gpio_is_valid(pdata->irq_gpio))
> +		pdata->irq_over_gpio = 1;
> +	else
> +		pdata->irq_trigger = IRQF_TRIGGER_NONE;
>  
>  	of_property_read_u32(np, "st,autosleep-timeout",
>  			&pdata->autosleep_timeout);

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

  reply	other threads:[~2014-09-15 23:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  3:18 [PATCH v2 0/2] Add irq_over_gpio DT support to STMPE Sean Cross
2014-09-12  3:18 ` [PATCH v2 1/2] mfd: stmpe: support gpio over irq under device tree Sean Cross
2014-09-15 23:12   ` Lee Jones [this message]
2014-09-12  3:18 ` [PATCH v2 2/2] mfd: stmpe: Document DT binding for irq_over_gpio Sean Cross
2014-09-15 23:13   ` Lee Jones

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=20140915231243.GL25162@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=bunnie@kosagi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=xobs@kosagi.com \
    /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 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).