soc/tegra: pmc: Remove leading space
PATCH 1/3 soc/tegra: pmc: Remove leading space
From: Thierry Reding <[email protected]>
Remove a leading space from a line that is otherwise indented by tabs.
--- drivers/soc/tegra/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/pmc.c +1 -1
@@ -2274,7 +2274,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,/* GPIO hierarchies stop at the PMC level */ if (!err && domain->parent) - err =irq_domain_disconnect_hierarchy (domain->parent, + err =irq_domain_disconnect_hierarchy (domain->parent, virq);break ; }
Signature · 1 line
2.36.1
PATCH 2/3 soc/tegra: pmc: Add support for simple wake events
From: Thierry Reding <[email protected]>
Simple wake events are neither mapped to GIC interrupts nor have an associated GPIO line. They are close to GPIO-backed wake events in that the IRQ hierarchy processing needs to stop at the PMC level, but since there is no dedicated GPIO line for them, let's turn them into a separate type.
--- drivers/soc/tegra/pmc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/soc/tegra/pmc.c +19 -0
@@ -296,6 +296,17 @@ struct tegra_wake_event { } gpio; }; +#define TEGRA_WAKE_SIMPLE (_name, _id) \ + { \ + .name = _name, \ + .id = _id, \ + .irq = 0, \ + .gpio = { \ + .instance = UINT_MAX, \ + .pin = UINT_MAX, \ + }, \ + } +#define TEGRA_WAKE_IRQ (_name, _id, _irq) \ { \ .name = _name, \
@@ -2239,6 +2250,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,for (i =0 ; i < soc->num_wake_events; i++) {const struct tegra_wake_event *event = &soc->wake_events[i]; +/* IRQ and simple wake events */ if (fwspec->param_count ==2 ) {struct irq_fwspec spec;
@@ -2251,6 +2263,12 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,if (err <0 )break ; +/* simple hierarchies stop at the PMC level */ +if (event->irq ==0 ) { + err =irq_domain_disconnect_hierarchy (domain->parent, virq); +break ; + } + spec.fwnode = &pmc->dev->of_node->fwnode; spec.param_count =3 ; spec.param[0 ] =GIC_SPI ;
@@ -2263,6 +2281,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,break ; } +/* GPIO wake events */ if (fwspec->param_count ==3 ) {if (event->gpio.instance != fwspec->param[0 ] || event->gpio.pin != fwspec->param[1 ])
Signature · 1 line
2.36.1
PATCH 3/3 soc/tegra: pmc: Add USB port wake events for Tegra194
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Tegra194 supports waking up from suspend when activity is detected on any of the USB ports. Add these wake events so that the system can be woken on such activity.
--- drivers/soc/tegra/pmc.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/soc/tegra/pmc.c +7 -0
@@ -3776,6 +3776,13 @@ static const struct tegra_wake_event tegra194_wake_events[] = {TEGRA_WAKE_IRQ ("pmu" ,24 ,209 ),TEGRA_WAKE_GPIO ("power" ,29 ,1 ,TEGRA194_AON_GPIO (EE ,4 )),TEGRA_WAKE_IRQ ("rtc" ,73 ,10 ), +TEGRA_WAKE_SIMPLE ("usb3-port-0" ,76 ), +TEGRA_WAKE_SIMPLE ("usb3-port-1" ,77 ), +TEGRA_WAKE_SIMPLE ("usb3-port-2-3" ,78 ), +TEGRA_WAKE_SIMPLE ("usb2-port-0" ,79 ), +TEGRA_WAKE_SIMPLE ("usb2-port-1" ,80 ), +TEGRA_WAKE_SIMPLE ("usb2-port-2" ,81 ), + TEGRA_WAKE_SIMPLE("usb2-port-3", 82), }; static const struct tegra_pmc_soc tegra194_pmc_soc = {
Signature · 1 line
2.36.1