All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Bryan Wu <cooloney@gmail.com>
Cc: Ian Lartey <ian@slimlogic.co.uk>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, ldewangan@nvidia.com,
	j-keerthy@ti.com, gg@slimlogic.co.uk, rpurdie@rpsys.net,
	grant.likely@secretlab.ca, rob.herring@calxeda.com,
	sameo@linux.intel.com
Subject: Re: [PATCH v2 1/2] leds: Add support for Palmas LEDs
Date: Tue, 12 Mar 2013 19:10:29 +0000	[thread overview]
Message-ID: <20130312191029.GC19942@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAK5ve-+-=R-f1KpEWD=4J3ia+QXmgnGvhDMV9tNf2_3WZupZaA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

On Tue, Mar 12, 2013 at 11:57:50AM -0700, Bryan Wu wrote:
> On Thu, Feb 28, 2013 at 7:21 AM, Ian Lartey <ian@slimlogic.co.uk> wrote:

> > +       spinlock_t value_lock;

> I think you don't need this spinlock to protect the value, the mutex is enough.

You need to use a spinlock because values can be set from hard IRQ
context so you can't take a mutex there.  Someone should really factor
this out into the framework in their copious free time, the set and
schedule pattern is very common in drivers.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-03-12 19:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 15:21 [PATCH v2 1/2] leds: Add support for Palmas LEDs Ian Lartey
2013-02-28 15:21 ` [PATCH v2 2/2] leds: Kconfig " Ian Lartey
2013-02-28 18:36 ` [PATCH v2 1/2] leds: Add support " Stephen Warren
2013-02-28 23:35   ` Ian Lartey
2013-03-12 18:57 ` Bryan Wu
2013-03-12 19:10   ` Mark Brown [this message]
2013-03-12 21:15     ` Bryan Wu
2013-03-12 23:32   ` Ian Lartey

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=20130312191029.GC19942@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@secretlab.ca \
    --cc=ian@slimlogic.co.uk \
    --cc=j-keerthy@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rpurdie@rpsys.net \
    --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.