From: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, lars@metafoo.de, knaack.h@gmx.de,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: [PATCH 2/4] iio: light: vcnl4000: Use BIT() macro
Date: Tue, 5 Jul 2016 12:23:19 +0200 [thread overview]
Message-ID: <1467714201-11429-3-git-send-email-pmeerw@pmeerw.net> (raw)
In-Reply-To: <1467714201-11429-1-git-send-email-pmeerw@pmeerw.net>
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
---
drivers/iio/light/vcnl4000.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 071ff97..7f247ed 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -41,10 +41,10 @@
#define VCNL4000_PS_MOD_ADJ 0x8a /* Proximity modulator timing adjustment */
/* Bit masks for COMMAND register */
-#define VCNL4000_AL_RDY 0x40 /* ALS data ready? */
-#define VCNL4000_PS_RDY 0x20 /* proximity data ready? */
-#define VCNL4000_AL_OD 0x10 /* start on-demand ALS measurement */
-#define VCNL4000_PS_OD 0x08 /* start on-demand proximity measurement */
+#define VCNL4000_AL_RDY BIT(6) /* ALS data ready? */
+#define VCNL4000_PS_RDY BIT(5) /* proximity data ready? */
+#define VCNL4000_AL_OD BIT(4) /* start on-demand ALS measurement */
+#define VCNL4000_PS_OD BIT(3) /* start on-demand proximity measurement */
struct vcnl4000_data {
struct i2c_client *client;
--
1.7.10.4
next prev parent reply other threads:[~2016-07-05 10:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 10:23 [PATCH 0/4] iio: light: vcnl4000: cleanup and fixes Peter Meerwald-Stadler
2016-07-05 10:23 ` [PATCH 1/4] iio: light: vcnl4000: Mention and check support for VCNL4010 and VCNL4020 Peter Meerwald-Stadler
2016-07-10 13:29 ` Jonathan Cameron
2016-07-05 10:23 ` Peter Meerwald-Stadler [this message]
2016-07-10 13:31 ` [PATCH 2/4] iio: light: vcnl4000: Use BIT() macro Jonathan Cameron
2016-07-05 10:23 ` [PATCH 3/4] iio: light: vcnl4000: Cleanup read_raw() returns Peter Meerwald-Stadler
2016-07-10 13:32 ` Jonathan Cameron
2016-07-05 10:23 ` [PATCH 4/4] iio: light: vcnl4000: Add missing locking Peter Meerwald-Stadler
2016-07-10 13:34 ` Jonathan Cameron
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=1467714201-11429-3-git-send-email-pmeerw@pmeerw.net \
--to=pmeerw@pmeerw.net \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/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).