mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
gpio: tegra186: Set affinity callback to parent
This assigns the .irq_set_affinity to the parent callback. I assume the Tegra186 is an SMP system so this would be beneficial. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patch. Suggested-by: Marc Zyngier <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Vidya Sagar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
@@ -444,6 +444,16 @@ static int tegra186_irq_set_wake(struct irq_data *data, unsigned int on)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra186_irq_set_affinity(struct irq_data *data,
|
||||
const struct cpumask *dest,
|
||||
bool force)
|
||||
{
|
||||
if (data->parent_data)
|
||||
return irq_chip_set_affinity_parent(data, dest, force);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static void tegra186_gpio_irq(struct irq_desc *desc)
|
||||
{
|
||||
struct tegra_gpio *gpio = irq_desc_get_handler_data(desc);
|
||||
@@ -690,6 +700,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
|
||||
gpio->intc.irq_unmask = tegra186_irq_unmask;
|
||||
gpio->intc.irq_set_type = tegra186_irq_set_type;
|
||||
gpio->intc.irq_set_wake = tegra186_irq_set_wake;
|
||||
gpio->intc.irq_set_affinity = tegra186_irq_set_affinity;
|
||||
|
||||
irq = &gpio->gpio.irq;
|
||||
irq->chip = &gpio->intc;
|
||||
|
||||
Reference in New Issue
Block a user