Commit 9c3ab855 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: ab-b5ze-s3: correct checkpatch issues

Correct trivial whitespace and split strings issues.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 606cc43c
...@@ -468,8 +468,8 @@ static int _abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -468,8 +468,8 @@ static int _abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
alarm_secs = rtc_tm_to_time64(alarm_tm); alarm_secs = rtc_tm_to_time64(alarm_tm);
if (alarm_secs > rtc_secs) { if (alarm_secs > rtc_secs) {
dev_err(dev, "%s: alarm maximum is one month in the " dev_err(dev, "%s: alarm maximum is one month in the future (%d)\n",
"future (%d)\n", __func__, ret); __func__, ret);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -621,8 +621,9 @@ static int abb5zes3_rtc_check_setup(struct device *dev) ...@@ -621,8 +621,9 @@ static int abb5zes3_rtc_check_setup(struct device *dev)
ABB5ZES3_REG_TIM_CLK_COF1 | ABB5ZES3_REG_TIM_CLK_COF2 | ABB5ZES3_REG_TIM_CLK_COF1 | ABB5ZES3_REG_TIM_CLK_COF2 |
ABB5ZES3_REG_TIM_CLK_TBM | ABB5ZES3_REG_TIM_CLK_TAM); ABB5ZES3_REG_TIM_CLK_TBM | ABB5ZES3_REG_TIM_CLK_TAM);
ret = regmap_update_bits(regmap, ABB5ZES3_REG_TIM_CLK, mask, ret = regmap_update_bits(regmap, ABB5ZES3_REG_TIM_CLK, mask,
ABB5ZES3_REG_TIM_CLK_COF0 | ABB5ZES3_REG_TIM_CLK_COF1 | ABB5ZES3_REG_TIM_CLK_COF0 |
ABB5ZES3_REG_TIM_CLK_COF2); ABB5ZES3_REG_TIM_CLK_COF1 |
ABB5ZES3_REG_TIM_CLK_COF2);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "%s: unable to initialize clkout register (%d)\n", dev_err(dev, "%s: unable to initialize clkout register (%d)\n",
__func__, ret); __func__, ret);
...@@ -675,9 +676,9 @@ static int abb5zes3_rtc_check_setup(struct device *dev) ...@@ -675,9 +676,9 @@ static int abb5zes3_rtc_check_setup(struct device *dev)
* switchover flag but not battery low flag. The latter is checked * switchover flag but not battery low flag. The latter is checked
* later below. * later below.
*/ */
mask = (ABB5ZES3_REG_CTRL3_PM0 | ABB5ZES3_REG_CTRL3_PM1 | mask = (ABB5ZES3_REG_CTRL3_PM0 | ABB5ZES3_REG_CTRL3_PM1 |
ABB5ZES3_REG_CTRL3_PM2 | ABB5ZES3_REG_CTRL3_BLIE | ABB5ZES3_REG_CTRL3_PM2 | ABB5ZES3_REG_CTRL3_BLIE |
ABB5ZES3_REG_CTRL3_BSIE| ABB5ZES3_REG_CTRL3_BSF); ABB5ZES3_REG_CTRL3_BSIE | ABB5ZES3_REG_CTRL3_BSF);
ret = regmap_update_bits(regmap, ABB5ZES3_REG_CTRL3, mask, 0); ret = regmap_update_bits(regmap, ABB5ZES3_REG_CTRL3, mask, 0);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "%s: unable to initialize CTRL3 register (%d)\n", dev_err(dev, "%s: unable to initialize CTRL3 register (%d)\n",
...@@ -694,10 +695,8 @@ static int abb5zes3_rtc_check_setup(struct device *dev) ...@@ -694,10 +695,8 @@ static int abb5zes3_rtc_check_setup(struct device *dev)
} }
if (reg & ABB5ZES3_REG_RTC_SC_OSC) { if (reg & ABB5ZES3_REG_RTC_SC_OSC) {
dev_err(dev, "clock integrity not guaranteed. Osc. has stopped " dev_err(dev, "clock integrity not guaranteed. Osc. has stopped or has been interrupted.\n");
"or has been interrupted.\n"); dev_err(dev, "change battery (if not already done) and then set time to reset osc. failure flag.\n");
dev_err(dev, "change battery (if not already done) and "
"then set time to reset osc. failure flag.\n");
} }
/* /*
...@@ -715,13 +714,12 @@ static int abb5zes3_rtc_check_setup(struct device *dev) ...@@ -715,13 +714,12 @@ static int abb5zes3_rtc_check_setup(struct device *dev)
data->battery_low = reg & ABB5ZES3_REG_CTRL3_BLF; data->battery_low = reg & ABB5ZES3_REG_CTRL3_BLF;
if (data->battery_low) { if (data->battery_low) {
dev_err(dev, "RTC battery is low; please, consider " dev_err(dev, "RTC battery is low; please, consider changing it!\n");
"changing it!\n");
ret = _abb5zes3_rtc_battery_low_irq_enable(regmap, false); ret = _abb5zes3_rtc_battery_low_irq_enable(regmap, false);
if (ret) if (ret)
dev_err(dev, "%s: disabling battery low interrupt " dev_err(dev, "%s: disabling battery low interrupt generation failed (%d)\n",
"generation failed (%d)\n", __func__, ret); __func__, ret);
} }
return ret; return ret;
...@@ -866,7 +864,7 @@ static int abb5zes3_probe(struct i2c_client *client, ...@@ -866,7 +864,7 @@ static int abb5zes3_probe(struct i2c_client *client,
if (client->irq > 0) { if (client->irq > 0) {
ret = devm_request_threaded_irq(dev, client->irq, NULL, ret = devm_request_threaded_irq(dev, client->irq, NULL,
_abb5zes3_rtc_interrupt, _abb5zes3_rtc_interrupt,
IRQF_SHARED|IRQF_ONESHOT, IRQF_SHARED | IRQF_ONESHOT,
DRV_NAME, client); DRV_NAME, client);
if (!ret) { if (!ret) {
device_init_wakeup(dev, true); device_init_wakeup(dev, true);
...@@ -888,8 +886,8 @@ static int abb5zes3_probe(struct i2c_client *client, ...@@ -888,8 +886,8 @@ static int abb5zes3_probe(struct i2c_client *client,
if (!data->battery_low && data->irq) { if (!data->battery_low && data->irq) {
ret = _abb5zes3_rtc_battery_low_irq_enable(regmap, true); ret = _abb5zes3_rtc_battery_low_irq_enable(regmap, true);
if (ret) { if (ret) {
dev_err(dev, "%s: enabling battery low interrupt " dev_err(dev, "%s: enabling battery low interrupt generation failed (%d)\n",
"generation failed (%d)\n", __func__, ret); __func__, ret);
goto err; goto err;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment