rtc: rv3028: remove useless warning messages
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 26 Jan 2021 22:14:34 +0000 (23:14 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 5 Feb 2021 23:56:31 +0000 (00:56 +0100)
Remove voltage low messages as userspace has a proper way to get the
information and react on it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210126221435.2152339-2-alexandre.belloni@bootlin.com
drivers/rtc/rtc-rv3028.c

index 4f8f6092097a12827c3b19e3c637082adec9edeb..2ee2afa3fa66a9cf86576aae5693ea45ecc641b8 100644 (file)
@@ -265,9 +265,6 @@ static irqreturn_t rv3028_handle_irq(int irq, void *dev_id)
                return IRQ_NONE;
        }
 
-       if (status & RV3028_STATUS_PORF)
-               dev_warn(&rv3028->rtc->dev, "Voltage low, data loss detected.\n");
-
        status &= ~RV3028_STATUS_PORF;
 
        if (status & RV3028_STATUS_TF) {
@@ -313,10 +310,8 @@ static int rv3028_get_time(struct device *dev, struct rtc_time *tm)
        if (ret < 0)
                return ret;
 
-       if (status & RV3028_STATUS_PORF) {
-               dev_warn(dev, "Voltage low, data is invalid.\n");
+       if (status & RV3028_STATUS_PORF)
                return -EINVAL;
-       }
 
        ret = regmap_bulk_read(rv3028->regmap, RV3028_SEC, date, sizeof(date));
        if (ret)
@@ -828,9 +823,6 @@ static int rv3028_probe(struct i2c_client *client)
        if (ret < 0)
                return ret;
 
-       if (status & RV3028_STATUS_PORF)
-               dev_warn(&client->dev, "Voltage low, data loss detected.\n");
-
        if (status & RV3028_STATUS_AF)
                dev_warn(&client->dev, "An alarm may have been missed.\n");