Skip to content

Commit f4ccb74

Browse files
RyceancurryMarc Zyngier
authored andcommitted
irqchip/bcm7120-l2: Set controller as wake-up source
Utilize the Broadcom interrupt controller standard property "brcm,irq-can-wake" to flag whether this particular interrupt controller instance is wake-up capable. Since we do not know what type of parent interrupt controller we are interfaced with, ensure that enable_irq_wake() is called early on. Signed-off-by: Justin Chen <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8ebf642 commit f4ccb74

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/irqchip/irq-bcm7120-l2.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn,
143143

144144
irq_set_chained_handler_and_data(parent_irq,
145145
bcm7120_l2_intc_irq_handle, l1_data);
146+
if (data->can_wake)
147+
enable_irq_wake(parent_irq);
148+
146149
return 0;
147150
}
148151

@@ -247,6 +250,8 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
247250
if (ret < 0)
248251
goto out_free_l1_data;
249252

253+
data->can_wake = of_property_read_bool(dn, "brcm,irq-can-wake");
254+
250255
for (irq = 0; irq < data->num_parent_irqs; irq++) {
251256
ret = bcm7120_l2_intc_init_one(dn, data, irq, valid_mask);
252257
if (ret)
@@ -274,9 +279,6 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
274279
goto out_free_domain;
275280
}
276281

277-
if (of_property_read_bool(dn, "brcm,irq-can-wake"))
278-
data->can_wake = true;
279-
280282
for (idx = 0; idx < data->n_words; idx++) {
281283
irq = idx * IRQS_PER_WORD;
282284
gc = irq_get_domain_generic_chip(data->domain, irq);

0 commit comments

Comments
 (0)