[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <16bd943f-ccae-c3a5-59d3-b429c12c8155@skidata.com>
Date: Wed, 22 May 2019 09:49:33 +0200
From: Richard Leitner <richard.leitner@...data.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
CC: <a.zummo@...ertech.it>, <linux-rtc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] rtc: s35390a: clarify INT2 pin output modes
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
Powered by blists - more mailing lists