summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tegra186.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-11-17 22:33:51 +0100
committerLinus Walleij <linus.walleij@linaro.org>2020-12-04 09:05:12 +0100
commitc4e1f7d92cd609e4929b2b3d8abe5eb21b9823ef (patch)
tree44dcb286636a922d143aabc0d04b5bbb7b67e419 /drivers/gpio/gpio-tegra186.c
parent011a78c1942ed6441880786d96cb90229e3ab0c9 (diff)
downloadlinux-c4e1f7d92cd609e4929b2b3d8abe5eb21b9823ef.tar.bz2
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 <maz@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Thierry Reding <treding@nvidia.com> Cc: Vidya Sagar <vidyas@nvidia.com> Link: https://lore.kernel.org/r/20201117213351.249668-2-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpio/gpio-tegra186.c')
-rw-r--r--drivers/gpio/gpio-tegra186.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index 9500074b1f1b..286e0b1f46e4 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -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;