Skip to content

Commit b06bc47

Browse files
khilmanUlf Hansson
authored andcommitted
pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
When a device supports IO daisy-chain wakeups, it uses a dedicated wake IRQ. Devices with IO daisy-chain wakeups enabled should not set wakeup constraints since these can happen even from deep power states, so should not prevent the DM from picking deep power states. Wake IRQs are set with dev_pm_set_wake_irq() or dev_pm_set_dedicated_wake_irq(). The latter is used by the serial driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c) when the interrupts-extended property is used to describe the dedicated wakeup interrupt. Detect these wake IRQs in the suspend path, and if set, skip sending constraint. Tested-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Message-ID: <20241206-lpm-v6-10-constraints-pmdomain-v6-3-833980158c68@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 9d8aa0d commit b06bc47

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/pmdomain/ti/ti_sci_pm_domains.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
8787
int ret;
8888

8989
if (device_may_wakeup(dev)) {
90+
/*
91+
* If device can wakeup using IO daisy chain wakeups,
92+
* we do not want to set a constraint.
93+
*/
94+
if (dev->power.wakeirq) {
95+
dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
96+
return;
97+
}
98+
9099
ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
91100
TISCI_MSG_CONSTRAINT_SET);
92101
if (!ret)

0 commit comments

Comments
 (0)