Skip to content

Commit

Permalink
Revert "rtc: m41t80: Clear oscillator fault bit during probe"
Browse files Browse the repository at this point in the history
This reverts commit 206778f.

When the OF bit is set, we want to ignore the stored value
until it's overwritten by a new one because it's known to be
invalid. The OF bit is being cleared in m41t80_rtc_set_time
already, so once the kernel stores a valid value into RTC
it can get read on next boot without issues.

Closes torvalds#258
  • Loading branch information
dos1 committed Feb 1, 2021
1 parent bd0c40e commit 6825704
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,17 +959,6 @@ static int m41t80_probe(struct i2c_client *client,
return rc;
}

/* Make sure OF (osciallator failure) is cleared */
rc = i2c_smbus_read_byte_data(client, M41T80_REG_FLAGS);

if (rc >= 0)
rc = i2c_smbus_write_byte_data(client, M41T80_REG_FLAGS,
rc & ~M41T80_FLAGS_OF);
if (rc < 0) {
dev_err(&client->dev, "Can't clear OF bit\n");
return rc;
}

#ifdef CONFIG_RTC_DRV_M41T80_WDT
if (m41t80_data->features & M41T80_FEATURE_HT) {
save_client = client;
Expand Down

0 comments on commit 6825704

Please sign in to comment.