[PATCH v2 5/5] rtc: s35390a: Add synology quirk

From: Markus Probst

Date: Sat Aug 01 2026 - 14:44:16 EST


Synology NAS devices use interrupt signal 1 for wakeup alarms. On ACPI
it is not possible to configure pinctrl.

Use interrupt signal 1 for wakeup if no pinctrl state has been
configured in devicetree and dmi sys vendor matches "Synology Inc.".

Signed-off-by: Markus Probst <markus.probst@xxxxxxxxx>
---
drivers/rtc/rtc-s35390a.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
index fc0dbce0e8f4..f20b8a5a72de 100644
--- a/drivers/rtc/rtc-s35390a.c
+++ b/drivers/rtc/rtc-s35390a.c
@@ -5,6 +5,7 @@
* Copyright (c) 2007 Byron Bradley
*/

+#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/rtc.h>
#include <linux/i2c.h>
@@ -806,7 +807,16 @@ static int s35390a_probe(struct i2c_client *client)

/* If no pinctrl config is defined in DT, fallback to previous behaviour */
if (!s35390a->mode_init) {
- err = s35390a_update_mode(s35390a, 1, S35390A_MODE_WAKEUP, 0);
+ i = 1;
+ /*
+ * Synology uses interrupt signal 1 for wakeup. Since pinctrl cannot be
+ * configured on ACPI, we check against the dmi sys vendor.
+ */
+ if (dmi_match(DMI_SYS_VENDOR, "Synology Inc.")) {
+ i = 0;
+ s35390a_update_mode(s35390a, 1, S35390A_MODE_DISABLE, 0);
+ }
+ err = s35390a_update_mode(s35390a, i, S35390A_MODE_WAKEUP, 0);
if (err)
return err;
}

--
2.54.0