Commit 2023c5c8 authored by Quentin Schulz's avatar Quentin Schulz Committed by Alexandre Belloni

rtc: isl1208: do not advertise update interrupt feature if no interrupt specified

If an ISL1208 device does not have an interrupt line routed, the feature
shouldn't be advertised (it is by default in rtc core) or it'll confuse
userspace requesting that feature (such as hwclock from util-linux).
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220523145320.123713-1-foss+kernel@0leil.net
parent 13968240
......@@ -880,10 +880,14 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (rc)
return rc;
if (client->irq > 0)
if (client->irq > 0) {
rc = isl1208_setup_irq(client, client->irq);
if (rc)
return rc;
if (rc)
return rc;
} else {
clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, isl1208->rtc->features);
}
if (evdet_irq > 0 && evdet_irq != client->irq)
rc = isl1208_setup_irq(client, evdet_irq);
......
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