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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux