BigW Consortium Gitlab

Commit f2865e7f by David Frey

rtc-pcf85063: remove explicit reg write in probe

Call pcf85063_set_clkout_freq() rather than manually writing the control_2 register in the probe function.
parent f72d0e55
...@@ -340,16 +340,10 @@ static int pcf85063_probe(struct i2c_client *client, ...@@ -340,16 +340,10 @@ static int pcf85063_probe(struct i2c_client *client,
goto exit; goto exit;
} }
/* /* Initialize output frequency to 0 Hz (disabled) */
* By default this chip output's square waves at 32768 Hz - let's set to err = pcf85063_set_clkout_freq(&client->dev, 0);
* off or COF[2:0] == 7 if (err)
*/
err = i2c_smbus_write_byte_data(client, PCF85063_REG_CTRL2, (u8) 0x7);
if (err) {
dev_err(&client->dev,
"Failed to write register PCF85063_REG_CTRL2\n");
goto exit; goto exit;
}
err = pcf85063_sysfs_register(&client->dev); err = pcf85063_sysfs_register(&client->dev);
if (err) if (err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment