Skip to content
Snippets Groups Projects
Commit d33cdd49 authored by Norman Stetter's avatar Norman Stetter
Browse files

RTC: pcf8563, prevent writing to TD[1:0] to work with bootselect

* disable TIMER_CONTROL register TD[1:0] bit configuration in PCF8563 driver
  probe since we use that bits for bootselect
parent 774256a1
No related branches found
No related tags found
1 merge request!3add rtc-pcf8563 as module
......@@ -549,7 +549,9 @@ static int pcf8563_probe(struct i2c_client *client,
{
struct pcf8563 *pcf8563;
int err;
#if 0
unsigned char buf;
#endif
dev_dbg(&client->dev, "%s\n", __func__);
......@@ -565,6 +567,12 @@ static int pcf8563_probe(struct i2c_client *client,
pcf8563->client = client;
device_set_wakeup_capable(&client->dev, 1);
/* Garz & Fricke systems use the TD[1:0] bits for bootselect storage.
So, we do not apply the power saving setting as stated in the datasheet
since we would reset the bootselect bits and mess up the boot control
between Yocto and FNG System.
*/
#if 0
/* Set timer to lowest frequency to save power (ref Haoyu datasheet) */
buf = PCF8563_TMRC_1_60;
err = pcf8563_write_block_data(client, PCF8563_REG_TMRC, 1, &buf);
......@@ -572,6 +580,7 @@ static int pcf8563_probe(struct i2c_client *client,
dev_err(&client->dev, "%s: write error\n", __func__);
return err;
}
#endif
/* Clear flags and disable interrupts */
buf = 0;
......@@ -625,9 +634,9 @@ MODULE_DEVICE_TABLE(i2c, pcf8563_id);
#ifdef CONFIG_OF
static const struct of_device_id pcf8563_of_match[] = {
{ .compatible = "nxp,pcf8563" },
{ .compatible = "epson,rtc8564" },
{ .compatible = "microcrystal,rv8564" },
{ .compatible = "nxp,pcf8563-guf" },
{ .compatible = "epson,rtc8564-guf" },
{ .compatible = "microcrystal,rv8564-guf" },
{}
};
MODULE_DEVICE_TABLE(of, pcf8563_of_match);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment