linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Alvin" <alvin.chen@intel.com>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>,
	"Tan, Raymond" <raymond.tan@intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Shevchenko, Andriy" <andriy.shevchenko@intel.com>
Subject: RE: [PATCH 1/1] mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver
Date: Tue, 4 Nov 2014 00:46:06 +0000	[thread overview]
Message-ID: <4656BEB6164FC34F8171C6538F1A595B2E9AB06D@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <54575A68.7060009@nexus-software.ie>

> 
> On 03/11/14 07:39, Raymond Tan wrote:
> > +	pdata->properties->irq	= pdev->irq;
> > +	pdata->properties->irq_shared	= true;
> 
> OK I see it.
> 
> Thanks.
> 
> My question is. How extensively have edge triggered interrupts been tested on
> the GPIO block ?
> 
> The BSP reference code is quite explicit about not missing edge interrupts.
> 
> Have you tested GPIO input in edge mode ?
We indeed test edge mode. Now all are moved to gpio-dwapb module which has been accepted by maintainer.
The BSP code doesn't meet the requirement of upstream, so we totally re-implement this feature in gpio-dwapb.
This patch only passes the necessary parameters and registers the platform devices.



> 
> +irqreturn_t intel_qrk_gpio_isr(int irq, void *dev_id) {
> +	irqreturn_t ret = IRQ_NONE;
> +	u32 pending = 0, gpio = 0;
> +	void __iomem *reg_pending = reg_base + PORTA_INT_STATUS;
> +	void __iomem *reg_eoi = reg_base + PORTA_INT_EOI;
> +
> +	/* Which pin (if any) triggered the interrupt */
> +	while ((pending = ioread32(reg_pending))) {
> +		/*
> +		 * Acknowledge all the asserted GPIO interrupt lines before
> +		 * serving them, so that we don't lose an edge.
> +		 * This has only effect on edge-triggered interrupts.
> +		 */
> +		iowrite32(pending, reg_eoi);
> +
> +		/* Serve each asserted interrupt */
> +		do {
> +			gpio = __ffs(pending);
> +			generic_handle_irq(
> +				gpio_to_irq(INTEL_QRK_GIP_GPIO_BASE + gpio));
> +			pending &= ~BIT(gpio);
> +			ret = IRQ_HANDLED;
> +		} while(pending);
> +	}
> +
> +	return ret;
> +}


  reply	other threads:[~2014-11-04  0:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  7:39 [PATCH 0/1] mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver Raymond Tan
2014-11-03  7:39 ` [PATCH 1/1] " Raymond Tan
2014-11-03  9:11   ` Andy Shevchenko
2014-11-03 13:09     ` Lee Jones
2014-11-11 12:57     ` Tan, Raymond
2014-11-03  9:43   ` Bryan O'Donoghue
2014-11-04  9:10     ` Shevchenko, Andriy
2014-11-04  9:22       ` Lee Jones
2014-11-03 10:35   ` Bryan O'Donoghue
2014-11-04  0:46     ` Chen, Alvin [this message]
2014-11-04  0:51     ` Chen, Alvin
2014-11-04 10:54       ` Bryan O'Donoghue

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=4656BEB6164FC34F8171C6538F1A595B2E9AB06D@SHSMSX101.ccr.corp.intel.com \
    --to=alvin.chen@intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pure.logic@nexus-software.ie \
    --cc=raymond.tan@intel.com \
    --cc=sameo@linux.intel.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).