Skip to content

Commit 34abf69

Browse files
committed
soc/tegra: pmc: Add comments clarifying wake events
Add some comments to clarify the purpose of the wake event support implemented in the PMC driver. Reviewed-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 03b3c21 commit 34abf69

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/soc/tegra/pmc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ struct tegra_pmc_soc {
241241
const char * const *reset_levels;
242242
unsigned int num_reset_levels;
243243

244+
/*
245+
* These describe events that can wake the system from sleep (i.e.
246+
* LP0 or SC7). Wakeup from other sleep states (such as LP1 or LP2)
247+
* are dealt with in the LIC.
248+
*/
244249
const struct tegra_wake_event *wake_events;
245250
unsigned int num_wake_events;
246251
};
@@ -1906,6 +1911,11 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,
19061911
}
19071912
}
19081913

1914+
/*
1915+
* For interrupts that don't have associated wake events, assign a
1916+
* dummy hardware IRQ number. This is used in the ->irq_set_type()
1917+
* and ->irq_set_wake() callbacks to return early for these IRQs.
1918+
*/
19091919
if (i == soc->num_wake_events)
19101920
err = irq_domain_set_hwirq_and_chip(domain, virq, ULONG_MAX,
19111921
&pmc->irq, pmc);
@@ -1924,6 +1934,7 @@ static int tegra_pmc_irq_set_wake(struct irq_data *data, unsigned int on)
19241934
unsigned int offset, bit;
19251935
u32 value;
19261936

1937+
/* nothing to do if there's no associated wake event */
19271938
if (WARN_ON(data->hwirq == ULONG_MAX))
19281939
return 0;
19291940

@@ -1954,6 +1965,7 @@ static int tegra_pmc_irq_set_type(struct irq_data *data, unsigned int type)
19541965
struct tegra_pmc *pmc = irq_data_get_irq_chip_data(data);
19551966
u32 value;
19561967

1968+
/* nothing to do if there's no associated wake event */
19571969
if (data->hwirq == ULONG_MAX)
19581970
return 0;
19591971

0 commit comments

Comments
 (0)