Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/rtc/rtc-snvs.c | 16 ++++++++++++++--
+ drivers/rtc/rtc-snvs.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
-diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
-index 757f4daa7181..0f1e544ac8db 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -33,6 +33,14 @@
struct snvs_rtc_data {
struct rtc_device *rtc;
struct regmap *regmap;
-@@ -57,6 +65,7 @@ static u64 rtc_read_lpsrt(struct snvs_rtc_data *data)
+@@ -57,6 +65,7 @@ static u64 rtc_read_lpsrt(struct snvs_rt
static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
{
u64 read1, read2;
unsigned int timeout = 100;
/* As expected, the registers might update between the read of the LSB
-@@ -67,7 +76,8 @@ static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
+@@ -67,7 +76,8 @@ static u32 rtc_read_lp_counter(struct sn
do {
read2 = read1;
read1 = rtc_read_lpsrt(data);
if (!timeout)
dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n");
-@@ -79,13 +89,15 @@ static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
+@@ -79,13 +89,15 @@ static u32 rtc_read_lp_counter(struct sn
static int rtc_read_lp_counter_lsb(struct snvs_rtc_data *data, u32 *lsb)
{
u32 count1, count2;
if (!timeout) {
dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n");
return -ETIMEDOUT;
---
-2.35.1
-