mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
Cc: linux-kernel@vger.kernel.org,
	broonie@opensource.wolfsonmicro.com, lrg@ti.com,
	Graeme Gregory <gg@slimlogic.co.uk>
Subject: Re: [PATCHv4 3/4] TPS65910: IRQ: Add interrupt controller
Date: Tue, 26 Apr 2011 16:01:17 +0200	[thread overview]
Message-ID: <20110426140116.GB3175@sortiz-mobl> (raw)
In-Reply-To: <F26256FF-CD37-496F-9DB0-35E9D5407DBB@slimlogic.co.uk>

Hi Jorge,

On Thu, Apr 21, 2011 at 09:35:49AM -0500, Jorge Eduardo Candelaria wrote:
> From: Graeme Gregory <gg@slimlogic.co.uk>
> 
> This module controls the interrupt handling for the tps chip. The
> interrupt sources are the following:
>
> - GPIO falling/rising edge detection
> - Battery voltage below/above threshold
> - PWRON signal
> - PWRHOLD signal
> - Temperature detection
> - RTC alarm and periodic event
The patch looks good, except for:

> +int tps65910_irq_init(struct tps65910 *tps65910, int irq,
> +		    struct tps65910_platform_data *pdata)
> +{
> +	int ret, cur_irq;
> +	int flags = IRQF_ONESHOT;
> +	u8 reg;
> +
> +	if (!irq) {
> +		dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n");
> +		return -EINVAL;
> +	}
> +
> +	if (!pdata || !pdata->irq_base) {
> +		dev_warn(tps65910->dev, "No interrupt support, no IRQ base\n");
> +		return -EINVAL;
> +	}
> +
> +	/* Mask top level interrupts */
> +	reg = 0xFF;
> +	tps65910->write(tps65910, TPS65910_INT_MSK, 1, &reg);
> +	reg = 0x03;
> +	tps65910->write(tps65910, TPS65910_INT_MSK2, 1, &reg);
> +
> +	mutex_init(&tps65910->irq_lock);
> +	tps65910->chip_irq = irq;
> +	tps65910->irq_base = pdata->irq_base;
> +
> +	/* Register with genirq */
> +	for (cur_irq = tps65910->irq_base;
> +	     cur_irq < TPS65910_NUM_IRQ + tps65910->irq_base;
> +	     cur_irq++) {
> +		irq_set_chip_data(cur_irq, tps65910);
> +		irq_set_chip_and_handler(cur_irq, &tps65910_irq_chip,
> +					 handle_edge_irq);
> +		irq_set_nested_thread(cur_irq, 1);
> +
> +		/* ARM needs us to explicitly flag the IRQ as valid
> +		 * and will set them noprobe when we do so. */
> +#ifdef CONFIG_ARM
> +		set_irq_flags(cur_irq, IRQF_VALID);
> +#else
> +		set_irq_noprobe(cur_irq);
That should be irq_set_noprobe().

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  reply	other threads:[~2011-04-26 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 14:35 Jorge Eduardo Candelaria
2011-04-26 14:01 ` Samuel Ortiz [this message]
2011-04-27  9:14 ` Mark Brown

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=20110426140116.GB3175@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gg@slimlogic.co.uk \
    --cc=jedu@slimlogic.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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

all inboxes | Powered by JetHome®