All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Luotao Fu <l.fu@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mfd: add STMPE811 core support
Date: Fri, 11 Jun 2010 12:13:26 +0100	[thread overview]
Message-ID: <20100611111326.GD12436@sirena.org.uk> (raw)
In-Reply-To: <1276251195-22981-2-git-send-email-l.fu@pengutronix.de>

On Fri, Jun 11, 2010 at 12:13:13PM +0200, Luotao Fu wrote:

> +	for_each_set_bit(bit, (unsigned long *)&int_stat, STMPE811_NUM_IRQ) {
> +		handler = stm->irqhandler[bit];
> +		data = stm->irqdata[bit];
> +		if (handler) {

You should be using genirq here - just call handle_nested_irq() if the
IRQ is asserted and let genirq manage the handler for you.

> +static irqreturn_t stmpe811_irq(int irq, void *data)
> +{
> +	struct stmpe811 *stm = data;
> +
> +	get_device(stm->dev);
> +	disable_irq_nosync(stm->irq);
> +	queue_work(stm->work_queue, &stm->irq_work);
> +
> +	return IRQ_HANDLED;
> +}

You should use request_threaded_irq() for the main IRQ - it will take
care of all this for you.


> +static struct i2c_device_id stmpe811_id_table[] = {
> +	{"stmpe811", 0x88},

Any reason for the 0x88 - you don't seem to use it anywhere?

> +int stmpe811_register_irq(struct stmpe811 *stm, int irq,
> +			  irq_handler_t handler, void *data);
> +int stmpe811_free_irq(struct stmpe811 *stm, int irq);

If you use genirq these can be dropped - this will also mean that
existing generic drivers using the standard GPIO and IRQ frameworks will
be able to use the chip without modification.

  parent reply	other threads:[~2010-06-11 11:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11 10:13 Patch serie for STMPE811 Luotao Fu
2010-06-11 10:13 ` [PATCH 1/3] mfd: add STMPE811 core support Luotao Fu
2010-06-11 11:03   ` Jonathan Cameron
2010-06-11 11:33     ` Luotao Fu
2010-06-11 11:13   ` Mark Brown [this message]
2010-06-11 11:38     ` Luotao Fu
2010-06-11 13:28   ` Wolfram Sang
2010-06-11 10:13 ` [PATCH 2/3] gpio: add STMPE811 gpio controller support Luotao Fu
2010-06-11 10:13 ` [PATCH 3/3] input: STMPE811 touch " Luotao Fu
2010-06-11 11:21   ` Mark Brown
2010-06-11 11:45     ` Luotao Fu
2010-06-14 10:32 ` Patch serie for STMPE811 [V2] Luotao Fu
2010-06-15  9:00   ` Patch serie for STMPE811 [V3] Luotao Fu
2010-06-15  9:00   ` [PATCH 1/3 V3] mfd: add STMPE811 core support Luotao Fu
2010-06-15 14:59     ` Mark Brown
2010-06-15  9:00   ` [PATCH 2/3 V3] gpio: add STMPE811 gpio controller support Luotao Fu
2010-06-15  9:00   ` [PATCH 3/3 V3] input: STMPE811 touch " Luotao Fu
2010-06-14 10:32 ` [PATCH 1/3 V2] mfd: add STMPE811 core support Luotao Fu
2010-06-14 11:50   ` Mark Brown
2010-06-14 12:04     ` Luotao Fu
2010-06-14 10:32 ` [PATCH 2/3 V2] gpio: add STMPE811 gpio controller support Luotao Fu
2010-06-14 11:51   ` Mark Brown
2010-06-14 12:09     ` Luotao Fu
2010-06-14 12:13       ` Mark Brown
2010-06-14 12:28         ` Luotao Fu
2010-06-14 12:34           ` Mark Brown
2010-06-14 12:34             ` Mark Brown
2010-06-14 12:13       ` Mark Brown
2010-06-14 10:32 ` [PATCH 3/3 V2] input: STMPE811 touch " Luotao Fu

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=20100611111326.GD12436@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=l.fu@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.