lkml.org 
[lkml]   [2019]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] rtc: s35390a: clarify INT2 pin output modes
From
Date
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

\
 
 \ /
  Last update: 2019-05-22 09:57    [W:0.066 / U:2.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site