@@ -41,8 +41,8 @@
#define REG_WEEKDAY_ALARM 0x0d
#define ALARM_DIS BIT(7)
-#define REG_OFFSET 0x0e
-#define REG_OFFSET_MODE BIT(7)
+#define PCF_REG_OFFSET 0x0e
+#define PCF_REG_OFFSET_MODE BIT(7)
#define REG_TMR_CLKOUT_CTRL 0x0f
@@ -442,13 +442,13 @@ static int pcf8523_rtc_read_offset(struc
u8 value;
s8 val;
- err = pcf8523_read(client, REG_OFFSET, &value);
+ err = pcf8523_read(client, PCF_REG_OFFSET, &value);
if (err < 0)
return err;
/* sign extend the 7-bit offset value */
val = value << 1;
- *offset = (value & REG_OFFSET_MODE ? 4069 : 4340) * (val >> 1);
+ *offset = (value & PCF_REG_OFFSET_MODE ? 4069 : 4340) * (val >> 1);
return 0;
}
@@ -465,9 +465,9 @@ static int pcf8523_rtc_set_offset(struct
if (abs(reg_m0 * 4340 - offset) < abs(reg_m1 * 4069 - offset))
value = reg_m0 & 0x7f;
else
- value = (reg_m1 & 0x7f) | REG_OFFSET_MODE;
+ value = (reg_m1 & 0x7f) | PCF_REG_OFFSET_MODE;
- return pcf8523_write(client, REG_OFFSET, value);
+ return pcf8523_write(client, PCF_REG_OFFSET, value);
}
static const struct rtc_class_ops pcf8523_rtc_ops = {