rtc: s35390a: Add synology quirk

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 pinmux function has been
configured in devicetree and dmi sys vendor matches "Synology Inc.".

Signed-off-by: Markus Probst <markus.probst@posteo.de>
Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-6-e7b1cbc50a7b@posteo.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Markus Probst 2026-09-30 15:31:53 +00:00 committed by Alexandre Belloni
parent cb4e92b151
commit f6550426f2

View File

@ -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>
@ -778,8 +779,18 @@ static int s35390a_probe(struct i2c_client *client)
return dev_err_probe(dev, err, "pinctrl enable failed\n");
/* If no pinmux function is defined in DT, fallback to previous behaviour */
fallback[0] = S35390A_FUNC_IGNORE;
fallback[1] = S35390A_FUNC_WAKEUP;
if (dmi_match(DMI_SYS_VENDOR, "Synology Inc.")) {
/*
* Synology uses interrupt signal 1 for wakeup. Since pinctrl cannot be
* configured on ACPI, we check against the dmi sys vendor.
*/
fallback[0] = S35390A_FUNC_WAKEUP;
fallback[1] = S35390A_FUNC_DISABLE;
} else {
fallback[0] = S35390A_FUNC_IGNORE;
fallback[1] = S35390A_FUNC_WAKEUP;
}
for (i = 0; i < ARRAY_SIZE(s35390a_pin_groups); i++) {
if (s35390a->pinfunction[i] == -1) {