aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorBryan Brattlof2022-08-16 12:33:11 -0500
committerAlexandre Belloni2022-08-23 22:25:28 +0200
commitf2c5671a64d2a79341e8ee45d5933f6a76960189 (patch)
treec172bf822230f5799042b7bdb673d9b34d775f8d /drivers/rtc
parent07ae9278b423500f93e10869b1a50276d82050ec (diff)
rtc: k3: wait until the unlock field is not zero
After writing the magic words to the KICK0 and KICK1 registers, we must wait for a 1 in the unlock field of the general control register to signify when the rtc device is in an unlocked state. Signed-off-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220816173312.23243-1-bb@ti.com
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ti-k3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c
index 7a0f181d3fef..fd26be7868d2 100644
--- a/drivers/rtc/rtc-ti-k3.c
+++ b/drivers/rtc/rtc-ti-k3.c
@@ -190,7 +190,7 @@ static int k3rtc_unlock_rtc(struct ti_k3_rtc *priv)
/* Skip fence since we are going to check the unlock bit as fence */
ret = regmap_field_read_poll_timeout(priv->r_fields[K3RTC_UNLOCK], ret,
- !ret, 2, priv->sync_timeout_us);
+ ret, 2, priv->sync_timeout_us);
return ret;
}