aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-07-25 05:50:22 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 07:19:11 -0400
commit2ddd18693cb93126077bd072884dffca423c1e27 (patch)
treec791ce030b19cb42cf3764174554d7cc046af464 /drivers/rtc
parentdbcce7cf1eb95c704faa3fff1acc974010c8e5a4 (diff)
rtc: rx8025: use BIT()
Use BIT() instead of hand coding. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-rx8025.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index 612b6876cbd5..52683eda1da2 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -19,6 +19,7 @@
19 * version 2 as published by the Free Software Foundation. 19 * version 2 as published by the Free Software Foundation.
20 */ 20 */
21#include <linux/bcd.h> 21#include <linux/bcd.h>
22#include <linux/bitops.h>
22#include <linux/i2c.h> 23#include <linux/i2c.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
24#include <linux/module.h> 25#include <linux/module.h>
@@ -45,17 +46,17 @@
45#define RX8025_BIT_CTRL1_CT (7 << 0) 46#define RX8025_BIT_CTRL1_CT (7 << 0)
46/* 1 Hz periodic level irq */ 47/* 1 Hz periodic level irq */
47#define RX8025_BIT_CTRL1_CT_1HZ 4 48#define RX8025_BIT_CTRL1_CT_1HZ 4
48#define RX8025_BIT_CTRL1_TEST (1 << 3) 49#define RX8025_BIT_CTRL1_TEST BIT(3)
49#define RX8025_BIT_CTRL1_1224 (1 << 5) 50#define RX8025_BIT_CTRL1_1224 BIT(5)
50#define RX8025_BIT_CTRL1_DALE (1 << 6) 51#define RX8025_BIT_CTRL1_DALE BIT(6)
51#define RX8025_BIT_CTRL1_WALE (1 << 7) 52#define RX8025_BIT_CTRL1_WALE BIT(7)
52 53
53#define RX8025_BIT_CTRL2_DAFG (1 << 0) 54#define RX8025_BIT_CTRL2_DAFG BIT(0)
54#define RX8025_BIT_CTRL2_WAFG (1 << 1) 55#define RX8025_BIT_CTRL2_WAFG BIT(1)
55#define RX8025_BIT_CTRL2_CTFG (1 << 2) 56#define RX8025_BIT_CTRL2_CTFG BIT(2)
56#define RX8025_BIT_CTRL2_PON (1 << 4) 57#define RX8025_BIT_CTRL2_PON BIT(4)
57#define RX8025_BIT_CTRL2_XST (1 << 5) 58#define RX8025_BIT_CTRL2_XST BIT(5)
58#define RX8025_BIT_CTRL2_VDET (1 << 6) 59#define RX8025_BIT_CTRL2_VDET BIT(6)
59 60
60/* Clock precision adjustment */ 61/* Clock precision adjustment */
61#define RX8025_ADJ_RESOLUTION 3050 /* in ppb */ 62#define RX8025_ADJ_RESOLUTION 3050 /* in ppb */