]> git.baikalelectronics.ru Git - kernel.git/commit
clk: si5341: Wait for DEVICE_READY on startup
authorRobert Hancock <robert.hancock@calian.com>
Thu, 25 Mar 2021 19:26:36 +0000 (13:26 -0600)
committerStephen Boyd <sboyd@kernel.org>
Mon, 28 Jun 2021 02:58:14 +0000 (19:58 -0700)
commitf16f7fa98dc22a9a80ee9d1f33328250283571f4
treece46b57cb82ef401c2283258d61c5489f098a69f
parentad8e13c7dbe2ce0d5033f54a1fd2e5939207fdf9
clk: si5341: Wait for DEVICE_READY on startup

The Si5341 datasheet warns that before accessing any other registers,
including the PAGE register, we need to wait for the DEVICE_READY register
to indicate the device is ready, or the process of the device loading its
state from NVM can be corrupted. Wait for DEVICE_READY on startup before
continuing initialization. This is done using a raw I2C register read
prior to setting up regmap to avoid any potential unwanted automatic PAGE
register accesses from regmap at this stage.

Fixes: 10c619dadb ("clk: Add Si5341/Si5340 driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20210325192643.2190069-3-robert.hancock@calian.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-si5341.c