Skip to content

Commit 673536c

Browse files
rtc: pcf8523: use BIT
Use the BIT macro to define register bits. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 219cc0f commit 673536c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/rtc/rtc-pcf8523.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
#define DRIVER_NAME "rtc-pcf8523"
1313

1414
#define REG_CONTROL1 0x00
15-
#define REG_CONTROL1_CAP_SEL (1 << 7)
16-
#define REG_CONTROL1_STOP (1 << 5)
15+
#define REG_CONTROL1_CAP_SEL BIT(7)
16+
#define REG_CONTROL1_STOP BIT(5)
1717

1818
#define REG_CONTROL3 0x02
19-
#define REG_CONTROL3_PM_BLD (1 << 7) /* battery low detection disabled */
20-
#define REG_CONTROL3_PM_VDD (1 << 6) /* switch-over disabled */
21-
#define REG_CONTROL3_PM_DSM (1 << 5) /* direct switching mode */
19+
#define REG_CONTROL3_PM_BLD BIT(7) /* battery low detection disabled */
20+
#define REG_CONTROL3_PM_VDD BIT(6) /* switch-over disabled */
21+
#define REG_CONTROL3_PM_DSM BIT(5) /* direct switching mode */
2222
#define REG_CONTROL3_PM_MASK 0xe0
23-
#define REG_CONTROL3_BLF (1 << 2) /* battery low bit, read-only */
23+
#define REG_CONTROL3_BLF BIT(2) /* battery low bit, read-only */
2424

2525
#define REG_SECONDS 0x03
26-
#define REG_SECONDS_OS (1 << 7)
26+
#define REG_SECONDS_OS BIT(7)
2727

2828
#define REG_MINUTES 0x04
2929
#define REG_HOURS 0x05

0 commit comments

Comments
 (0)