Skip to content

Commit f2c5671

Browse files
bryanbrattlofalexandrebelloni
authored andcommitted
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 <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 07ae927 commit f2c5671

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-ti-k3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int k3rtc_unlock_rtc(struct ti_k3_rtc *priv)
190190

191191
/* Skip fence since we are going to check the unlock bit as fence */
192192
ret = regmap_field_read_poll_timeout(priv->r_fields[K3RTC_UNLOCK], ret,
193-
!ret, 2, priv->sync_timeout_us);
193+
ret, 2, priv->sync_timeout_us);
194194

195195
return ret;
196196
}

0 commit comments

Comments
 (0)