All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, Dajun <dajun.chen@diasemi.com>
Subject: Re: [PATCH 01/01] MFD: add ADC support to DA9052/53 MFD  core v2
Date: Mon, 20 Feb 2012 12:07:27 +0000	[thread overview]
Message-ID: <201202201207.27510.arnd@arndb.de> (raw)
In-Reply-To: <20120220114420.GT5387@sortiz-mobl>

On Monday 20 February 2012, Samuel Ortiz wrote:
> On Fri, Jan 13, 2012 at 08:00:51PM +0530, Ashish Jangam wrote:
> > +struct completion done;
> This shouldn't be a global variable, but a struct da9052 one instead.

Right. Since this thread has showed up in my inbox again, I've
also taken a look at the patch now and noticed another thing:

>> +       ret = request_threaded_irq(da9052->irq_base + DA9052_IRQ_ADC_EOM,
>> +                                  NULL, da9052_auxadc_irq,
>> +                                  IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>> +                                  "adc irq", NULL);

First of all, to clarify: The last argument to this function needs to be
the pointer to da9052 so that it is available in the irq handler function.

Also, I would recommend using request_irq instead of request_threaded_irq
here because the function only has a single "complete()" call in it,
just like a threaded IRQ handler has. There is no point going through
another thread just to wake up the one that is blocked.

	Arnd

  reply	other threads:[~2012-02-20 12:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 14:30 [PATCH 01/01] MFD: add ADC support to DA9052/53 MFD core v2 Ashish Jangam
2012-02-20 11:44 ` Samuel Ortiz
2012-02-20 12:07   ` Arnd Bergmann [this message]
2012-02-20 15:41     ` Mark Brown
     [not found] <C3AE124F08223B42BC95AEB82F0F6CED2B996CCD@KCHJEXMB01.kpit.com>
2012-02-21 11:31 ` Ashish Jangam
2012-02-21 12:04   ` Arnd Bergmann

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=201202201207.27510.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ashish.jangam@kpitcummins.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dajun.chen@diasemi.com \
    --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.