lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110426140116.GB3175@sortiz-mobl>
Date:	Tue, 26 Apr 2011 16:01:17 +0200
From:	Samuel Ortiz <sameo@...ux.intel.com>
To:	Jorge Eduardo Candelaria <jedu@...mlogic.co.uk>
Cc:	linux-kernel@...r.kernel.org, broonie@...nsource.wolfsonmicro.com,
	lrg@...com, Graeme Gregory <gg@...mlogic.co.uk>
Subject: Re: [PATCHv4 3/4] TPS65910: IRQ: Add interrupt controller

Hi Jorge,

On Thu, Apr 21, 2011 at 09:35:49AM -0500, Jorge Eduardo Candelaria wrote:
> From: Graeme Gregory <gg@...mlogic.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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ