From: Marek Vasut <marex@denx.de>
To: Matt Ranostay <mranostay@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
Matt Porter <matt.porter@linaro.org>,
Koen Kooi <koen@dominion.thruhere.net>,
Pantelis Antoniou <pantelis.antoniou@gmail.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 2/2] iio: Add AS3935 lightning sensor support
Date: Sat, 1 Feb 2014 06:28:04 +0100 [thread overview]
Message-ID: <201402010628.04324.marex@denx.de> (raw)
In-Reply-To: <CAKzfze8b6m__TprPoNthRZ=2h9D11MfK8Q-mR9=KWySP4aDnMA@mail.gmail.com>
On Saturday, February 01, 2014 at 06:03:22 AM, Matt Ranostay wrote:
> Duly noted. Will be fixed in the next rev... mutexs are pointless as you
> say.. only corner case would be if you were changing gain_boost and a event
> came in at the same time. But that wouldn't harm anything except slightly
> delay the gain_boost being updated by some x microseconds.
Please stop top-posting ;-)
btw I think you might need a mutex around the entire:
+static void calibrate_as3935(struct as3935_state *st)
+{
+ /* mask disturber interrupt bit */
+ as3935_write(st, AS3935_INT, 1 << 5);
+
+ as3935_write(st, AS3935_CALIBRATE, 0x96);
+ as3935_write(st, AS3935_TUNE_CAP, 1 << 5 | st->tune_cap);
+
+ mdelay(2);
+ as3935_write(st, AS3935_TUNE_CAP, st->tune_cap);
+}
and similar functions where you do a bunch of register accesses. This is because
you probably want to protect them against concurent execution so the chip won't
be confused if a user were to poke something via SYSFS twice.
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-02-01 5:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 15:38 [PATCH 1/2] iio: add IIO_DISTANCE type Matt Ranostay
2014-01-31 15:38 ` [PATCH 2/2] iio: Add AS3935 lightning sensor support Matt Ranostay
2014-02-01 3:12 ` Marek Vasut
[not found] ` <CAKzfze8b6m__TprPoNthRZ=2h9D11MfK8Q-mR9=KWySP4aDnMA@mail.gmail.com>
2014-02-01 5:28 ` Marek Vasut [this message]
2014-02-01 3:01 ` [PATCH 1/2] iio: add IIO_DISTANCE type Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2014-02-06 7:00 [PATCH 0/2] AS3935 lightning sensor support Matt Ranostay
2014-02-06 7:00 ` [PATCH 2/2] iio: Add " Matt Ranostay
2014-02-09 21:48 ` Jonathan Cameron
2014-02-09 23:32 ` Matt Ranostay
2014-01-30 10:11 [PATCH 1/2] iio: add IIO_DISTANCE type Matt Ranostay
2014-01-30 10:11 ` [PATCH 2/2] iio: Add AS3935 lightning sensor support Matt Ranostay
2014-01-30 10:37 ` Peter Meerwald
2014-01-31 13:24 ` Jonathan Cameron
2014-01-31 21:05 ` Alexandre Belloni
2014-01-31 21:25 ` Matt Porter
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=201402010628.04324.marex@denx.de \
--to=marex@denx.de \
--cc=broonie@kernel.org \
--cc=koen@dominion.thruhere.net \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.porter@linaro.org \
--cc=mranostay@gmail.com \
--cc=pantelis.antoniou@gmail.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;
as well as URLs for NNTP newsgroup(s).