Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80663607 authored by David Lowe's avatar David Lowe Committed by Alexandre Belloni
Browse files

rtc: rtc-ds1307: enable support for mcp794xx as a wakeup source without IRQ



This patch extends the fixes for ds1337, ds1339, ds3231 in commit
8bc2a407 ("rtc: ds1307: add support for the DT property
'wakeup-source'") to mcp794xx devices, so that those parts can similarly be
used as a wakeup source without an IRQ to the processor.

Tested on Raspberry Pi ZeroW with MCP79400.

Signed-off-by: default avatarDavid Lowe <dave-lowe@ntlworld.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 11e5890b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1407,7 +1407,8 @@ static int ds1307_probe(struct i2c_client *client,
		break;
		break;
	case mcp794xx:
	case mcp794xx:
		rtc_ops = &mcp794xx_rtc_ops;
		rtc_ops = &mcp794xx_rtc_ops;
		if (ds1307->irq > 0 && chip->alarm) {
		if (chip->alarm && (ds1307->irq > 0 ||
				    ds1307_can_wakeup_device)) {
			irq_handler = mcp794xx_irq;
			irq_handler = mcp794xx_irq;
			want_irq = true;
			want_irq = true;
		}
		}