Re: [PATCH 1/3] rtc: s35390a: clarify INT2 pin output modes

From: Richard Leitner
Date: Wed May 22 2019 - 03:59:28 EST


On 21/05/2019 17:54, Alexandre Belloni wrote:
Hello,

This seems good to me but...

On 21/05/2019 16:20:22+0200, Richard Leitner wrote:

--- a/drivers/rtc/rtc-s35390a.c
+++ b/drivers/rtc/rtc-s35390a.c
@@ -45,12 +45,13 @@
/* flag for STATUS2 */
#define S35390A_FLAG_TEST 0x01
-#define S35390A_INT2_MODE_MASK 0xF0
-
+/* INT2 pin output mode */
+#define S35390A_INT2_MODE_MASK 0x0E
#define S35390A_INT2_MODE_NOINTR 0x00
-#define S35390A_INT2_MODE_FREQ 0x10
-#define S35390A_INT2_MODE_ALARM 0x40
-#define S35390A_INT2_MODE_PMIN_EDG 0x20
+#define S35390A_INT2_MODE_ALARM 0x02 /* INT2AE */
+#define S35390A_INT2_MODE_PMIN_EDG 0x04 /* INT2ME */
+#define S35390A_INT2_MODE_FREQ 0x08 /* INT2FE */
+#define S35390A_INT2_MODE_PMIN 0x0C /* INT2ME | INT2FE */

While you are at it you may as well use BIT().

Sure, will change that for v2.

regards;Richard.L