Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/rtc/rtc-pcf85063.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,15 @@ static int pcf85063_probe(struct i2c_client *client)
dev_err(&client->dev, "RTC chip is not present\n");
return err;
}
ret = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
if (ret < 0)
return ret;

// cleat the OS Bit if it is set
if ((tmp & (1 << (8 - 1)))) {
tmp = tmp & (~(1 << (8 - 1)));
regmap_write(pcf85063->regmap, PCF85063_REG_SC, tmp);
}
pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
if (IS_ERR(pcf85063->rtc))
return PTR_ERR(pcf85063->rtc);
Expand Down