linux-stable/drivers/gpio
Jon Hunter bdbe871ef0 gpio: tegra186: Don't set parent IRQ affinity
When hotplugging CPUs on Tegra186 and Tegra194 errors such as the
following are seen ...

 IRQ63: set affinity failed(-22).
 IRQ65: set affinity failed(-22).
 IRQ66: set affinity failed(-22).
 IRQ67: set affinity failed(-22).

Looking at the /proc/interrupts the above are all interrupts associated
with GPIOs. The reason why these error messages occur is because there
is no 'parent_data' associated with any of the GPIO interrupts and so
tegra186_irq_set_affinity() simply returns -EINVAL.

To understand why there is no 'parent_data' it is first necessary to
understand that in addition to the GPIO interrupts being routed to the
interrupt controller (GIC), the interrupts for some GPIOs are also
routed to the Tegra Power Management Controller (PMC) to wake up the
system from low power states. In order to configure GPIO events as
wake events in the PMC, the PMC is configured as IRQ parent domain
for the GPIO IRQ domain. Originally the GIC was the IRQ parent domain
of the PMC and although this was working, this started causing issues
once commit 64a267e9a4 ("irqchip/gic: Configure SGIs as standard
interrupts") was added, because technically, the GIC is not a parent
of the PMC. Commit c351ab7bf2 ("soc/tegra: pmc: Don't create fake
interrupt hierarchy levels") fixed this by severing the IRQ domain
hierarchy for the Tegra GPIOs and hence, there may be no IRQ parent
domain for the GPIOs.

The GPIO controllers on Tegra186 and Tegra194 have either one or six
interrupt lines to the interrupt controller. For GPIO controllers with
six interrupts, the mapping of the GPIO interrupt to the controller
interrupt is configurable within the GPIO controller. Currently a
default mapping is used, however, it could be possible to use the
set affinity callback for the Tegra186 GPIO driver to do something a
bit more interesting. Currently, because interrupts for all GPIOs are
have the same mapping and any attempts to configure the affinity for
a given GPIO can conflict with another that shares the same IRQ, for
now it is simpler to just remove set affinity support and this avoids
the above warnings being seen.

Cc: <stable@vger.kernel.org>
Fixes: c4e1f7d92c ("gpio: tegra186: Set affinity callback to parent")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-05-12 13:56:43 +02:00
..
Kconfig gpio updates for v5.13 2021-05-05 12:39:29 -07:00
Makefile gpio updates for v5.13 2021-05-05 12:39:29 -07:00
TODO gpio: intel-mid: Remove driver for deprecated platform 2021-02-15 11:43:32 +01:00
gpio-74x164.c gpio: 74x164: utilize the for_each_set_clump8 macro 2019-12-04 19:44:12 -08:00
gpio-74xx-mmio.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-104-dio-48e.c gpio: 104-dio-48e: Fix coding style issues 2021-05-05 16:07:41 +02:00
gpio-104-idi-48.c gpio: 104-idi-48: improve code indentation 2020-10-29 14:58:00 +01:00
gpio-104-idio-16.c gpio: 104-idio-16: Use irqchip template 2020-07-23 15:10:25 +02:00
gpio-adnp.c gpio: adnp: Use irqchip template 2020-07-20 15:34:59 +02:00
gpio-adp5520.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149 2019-05-30 11:25:18 -07:00
gpio-adp5588.c gpio: adp5588: Use irqchip template 2020-07-20 15:47:50 +02:00
gpio-aggregator.c gpio: aggregator: Replace custom get_arg() with a generic next_arg() 2021-05-05 16:07:40 +02:00
gpio-altera-a10sr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
gpio-altera.c gpio: gpio-altera: Add missing kerneldoc entry and demote comment 2020-07-08 09:24:07 +02:00
gpio-amd-fch.c gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION 2020-09-28 12:22:04 +02:00
gpio-amd8111.c drivers: gpio: amd8111: use SPDX-License-Identifier 2020-12-08 09:41:32 +01:00
gpio-amdpt.c Bulk GPIO changes for the v5.3 kernel cycle: 2019-07-09 09:07:00 -07:00
gpio-arizona.c gpio: arizona: disable pm_runtime in case of failure 2020-12-02 10:40:54 +01:00
gpio-aspeed-sgpio.c Some late GPIO fixes for the v5.9 series: 2020-10-02 09:51:42 -07:00
gpio-aspeed.c gpio: aspeed: fix ast2600 bank properties 2020-10-26 15:51:57 +01:00
gpio-ath79.c gpio: ath79: Fix fall-through warning for Clang 2020-12-01 15:49:50 +01:00
gpio-bcm-kona.c gpio: bcm-kona: Simplify with dev_err_probe() 2020-08-28 20:13:51 +02:00
gpio-bd9571mwv.c gpio: bd9571mwv: Add BD9574MWF support 2021-01-14 13:05:55 +00:00
gpio-bd70528.c gpio: bd7xxxx: use helper variable for pdev->dev 2021-02-15 11:43:27 +01:00
gpio-bd71815.c gpio: Support ROHM BD71815 GPOs 2021-04-14 10:19:22 +01:00
gpio-bd71828.c gpio: bd7xxxx: use helper variable for pdev->dev 2021-02-15 11:43:27 +01:00
gpio-brcmstb.c gpio: brcmstb: support gpio-line-names property 2020-03-26 00:02:03 +01:00
gpio-bt8xx.c drivers: gpio: bt8xx: prefer dev_err()/dev_warn() over of raw printk 2020-12-08 09:41:32 +01:00
gpio-cadence.c gpio: cadence: Add missing MODULE_DEVICE_TABLE 2021-05-12 13:28:04 +02:00
gpio-clps711x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gpio-creg-snps.c gpio: aspeed-sgpio: fixed typos 2020-01-23 16:16:05 +01:00
gpio-crystalcove.c gpio: crystalcove: Free IRQ on error path 2020-08-04 01:25:02 +02:00
gpio-cs5535.c gpio: cs5535: Simplify the return expression of cs5535_gpio_probe() 2020-12-12 01:37:46 +01:00
gpio-da9052.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gpio-da9055.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gpio-davinci.c gpio: davinci: Simplify with dev_err_probe() 2020-08-28 20:15:06 +02:00
gpio-dln2.c gpio: dln2: Use irqchip template 2020-07-23 15:03:25 +02:00
gpio-dwapb.c This is the bulk of the GPIO changes for the v5.11 kernel cycle: 2020-12-17 18:07:20 -08:00
gpio-eic-sprd.c gpio: eic-sprd: break loop when getting NULL device resource 2020-12-09 09:41:49 +01:00
gpio-em.c gpio: em: Use platform_get_irq() to obtain interrupts 2019-11-13 13:47:48 +01:00
gpio-ep93xx.c gpio: ep93xx: refactor base IRQ number 2021-02-15 11:43:34 +01:00
gpio-exar.c gpio: exar: use devm action for freeing the IDA and drop remove() 2020-11-25 15:36:52 +01:00
gpio-f7188x.c gpio-f7188x: Add GPIO support for F81865 2020-05-05 18:22:26 +02:00
gpio-ftgpio010.c gpio: ftgpio010: Fix small typo 2020-04-28 15:50:28 +02:00
gpio-ge.c
gpio-gpio-mm.c gpio: gpio-mm: utilize for_each_set_clump8 macro 2019-12-04 19:44:12 -08:00
gpio-grgpio.c gpio: Remove the unused flags 2020-01-15 11:24:19 +01:00
gpio-gw-pld.c
gpio-hisi.c MAINTAINERS: Add maintainer for HiSilicon GPIO driver 2020-12-16 21:57:27 +01:00
gpio-hlwd.c gpio: hlwd: Pass irqchip when adding gpiochip 2019-08-15 09:57:29 +02:00
gpio-htc-egpio.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-ich.c gpio: ich: Switch to be dependent on LPC_ICH 2021-05-05 16:07:41 +02:00
gpio-iop.c Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
gpio-it87.c gpio: it87: remove unused code 2021-05-05 16:07:41 +02:00
gpio-ixp4xx.c gpio: updates for v5.4 2019-09-03 16:04:19 +02:00
gpio-janz-ttl.c Bulk GPIO changes for the v5.3 kernel cycle: 2019-07-09 09:07:00 -07:00
gpio-kempld.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-logicvc.c gpio: Add support for the Xylon LogiCVC GPIOs 2019-12-13 09:50:29 +01:00
gpio-loongson.c MIPS: Loongson64: Rename CPU TYPES 2019-10-31 15:03:10 -07:00
gpio-loongson1.c
gpio-lp873x.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-lp3943.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
gpio-lp87565.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-lpc18xx.c
gpio-lpc32xx.c gpio: lpc32xx: allow building on non-lpc32xx targets 2019-08-15 21:33:07 +02:00
gpio-madera.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-max730x.c gpio: max730x: bring gpiochip_add_data after port config 2020-05-22 17:01:25 +02:00
gpio-max732x.c gpio: max732x: Use irqchip template 2020-08-04 01:12:43 +02:00
gpio-max3191x.c gpio: max3191x: utilize the for_each_set_clump8 macro 2019-12-04 19:44:13 -08:00
gpio-max7300.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio-max7301.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio-max77620.c gpio: max77620: convert comma to semicolon 2021-02-15 11:43:29 +01:00
gpio-max77650.c gpio: max77650: add MODULE_ALIAS() 2019-07-29 00:03:52 +02:00
gpio-mb86s7x.c gpio: mb86s7x: Remove superfluous test for ACPI companion 2020-05-18 09:15:16 +02:00
gpio-mc9s08dz60.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
gpio-mc33880.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176 2019-05-30 11:29:19 -07:00
gpio-menz127.c drivers: mcb: use symbol namespaces 2019-11-03 19:54:53 +01:00
gpio-merrifield.c gpio: merrifield: Make bias configuration available for GPIOs 2021-02-15 11:43:31 +01:00
gpio-ml-ioh.c gpio: gpio-ml-ioh: Fix missing ':' in 'struct ioh_gpio_reg_data 2020-06-30 17:00:11 +03:00
gpio-mlxbf.c gpio: gpio-mlxbf: Tell the compiler that ACPI functions may not be used 2020-07-08 09:24:08 +02:00
gpio-mlxbf2.c gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse 2020-07-08 09:24:08 +02:00
gpio-mm-lantiq.c gpio: mm-lantiq: Fix small typo 2020-04-28 22:41:25 +02:00
gpio-mmio.c gpio: mmio: replace open-coded for_each_set_bit() 2020-07-16 15:07:18 +02:00
gpio-mockup.c gpio: mockup: Drop duplicate NULL check in gpio_mockup_unregister_pdevs() 2021-03-26 14:56:19 +01:00
gpio-moxtet.c treewide: change my e-mail address, fix my name 2021-04-09 14:54:23 -07:00
gpio-mpc8xxx.c gpio: mpc8xxx: Add ACPI support 2021-05-05 16:07:41 +02:00
gpio-mpc5200.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
gpio-msc313.c gpio: msc313: MStar MSC313 GPIO driver 2020-12-05 22:41:22 +01:00
gpio-mt7621.c gpio: mt7621: add BGPIOF_NO_SET_ON_INPUT flag 2020-03-25 09:50:45 +01:00
gpio-mvebu.c gpio: mvebu: add pwm support for Armada 8K/7K 2021-02-15 11:43:31 +01:00
gpio-mxc.c gpio: mxc: Convert the driver to DT-only 2020-11-18 08:52:22 +01:00
gpio-mxs.c gpio: mxs: remove useless function 2021-05-05 16:07:41 +02:00
gpio-octeon.c
gpio-omap.c gpio updates for v5.13 2021-05-05 12:39:29 -07:00
gpio-palmas.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
gpio-pca953x.c gpio: pca953x: Set IRQ type when handle Intel Galileo Gen 2 2021-03-08 11:59:17 +01:00
gpio-pca9570.c gpio: pca9570: add GPO driver for PCA9570 2020-07-16 14:35:12 +02:00
gpio-pcf857x.c gpio: pcf857x: Fix missing first interrupt 2021-02-18 15:52:44 +01:00
gpio-pch.c gpio: pch: Add a blank line between declaration and code 2020-07-21 19:12:57 +03:00
gpio-pci-idio-16.c gpio: pci-idio-16: Use irqchip template 2020-07-23 15:11:26 +02:00
gpio-pcie-idio-24.c gpio: pcie-idio-24: Enable PEX8311 interrupts 2020-11-06 15:19:44 +01:00
gpio-pisosr.c gpio: pisosr: Simplify with dev_err_probe() 2020-08-28 20:15:51 +02:00
gpio-pl061.c gpio: pl061: Support building as module 2020-04-14 16:23:46 +02:00
gpio-pmic-eic-sprd.c gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map' 2020-07-08 09:24:07 +02:00
gpio-pxa.c gpio: pxa: Fix return value of pxa_gpio_probe() 2020-05-25 11:14:36 +02:00
gpio-raspberrypi-exp.c gpio: raspberrypi-exp: Release firmware handle on unbind 2021-03-22 17:59:51 +01:00
gpio-rc5t583.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
gpio-rcar.c gpio: rcar: Add R-Car V3U (R8A779A0) support 2021-02-15 11:43:27 +01:00
gpio-rda.c gpio: Add RDA Micro GPIO controller support 2019-10-29 15:12:52 +01:00
gpio-rdc321x.c
gpio-realtek-otto.c gpio: Add Realtek Otto GPIO support 2021-05-05 16:07:40 +02:00
gpio-reg.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-regmap.c gpio: regmap: set gpio_chip of_node 2021-03-29 12:20:07 +02:00
gpio-sa1100.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-sama5d2-piobu.c gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic comment blocks 2020-07-08 09:24:07 +02:00
gpio-sch.c gpio: sch: Hook into ACPI GPE handler to catch GPIO edge events 2021-05-05 16:07:40 +02:00
gpio-sch311x.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-sifive.c gpio updates for v5.11-rc1 2020-12-09 15:17:24 +01:00
gpio-siox.c gpio: siox: explicitly support only threaded irqs 2020-09-09 12:59:15 +02:00
gpio-sl28cpld.c gpio: sl28cpld: convert comma to semicolon 2021-02-15 11:43:26 +01:00
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c gpio: sprd: Clear interrupt when setting the type as edge 2020-08-31 18:06:28 +02:00
gpio-sta2x11.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
gpio-stmpe.c gpio: stmpe: Fix forgotten refactoring 2020-10-28 15:51:27 +01:00
gpio-stp-xway.c gpio: stp-xway: automatically drive GPHY leds on ar10 and grx390 2020-08-18 21:32:28 +02:00
gpio-syscon.c gpio: gpio-syscon: Fix formatting issues which confuse kerneldoc 2020-07-08 09:24:08 +02:00
gpio-tb10x.c gpio: remove unneeded MODULE_VERSION() usage 2019-12-12 17:09:50 +01:00
gpio-tc3589x.c GPIO bulk changes for the v5.10 kernel cycle: 2020-10-13 10:09:33 -07:00
gpio-tegra.c gpio: tegra: Fix irq_set_affinity 2021-02-15 11:43:30 +01:00
gpio-tegra186.c gpio: tegra186: Don't set parent IRQ affinity 2021-05-12 13:56:43 +02:00
gpio-thunderx.c gpio: thunderx: Switch to GPIOLIB_IRQCHIP 2020-01-15 11:18:29 +01:00
gpio-timberdale.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 176 2019-05-30 11:29:19 -07:00
gpio-tpic2810.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-tps6586x.c
gpio-tps65086.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-tps65218.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 111 2019-05-24 17:39:01 +02:00
gpio-tps65910.c gpio: tps65910: use regmap accessors 2020-11-19 08:34:22 +00:00
gpio-tps65912.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-tps68470.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-tqmx86.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-ts4800.c
gpio-ts4900.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-ts5500.c
gpio-twl4030.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-twl6040.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-ucb1400.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio-uniphier.c gpio: uniphier: Replace zero-length array with flexible-array member 2020-03-02 08:52:55 +01:00
gpio-vf610.c gpio: vf610: Pass irqchip when adding gpiochip 2019-08-23 09:41:18 +02:00
gpio-viperboard.c gpio: viperboard: Replace 'unsigned' with 'unsigned int' 2019-08-05 11:26:58 +02:00
gpio-visconti.c gpio: visconti: Add Toshiba Visconti GPIO support 2021-02-15 11:43:26 +01:00
gpio-vr41xx.c gpio: vr41xx: Use devm_platform_ioremap_resource() 2019-06-27 15:56:51 +01:00
gpio-vx855.c gpio: vx855: convert comma to semicolon 2021-02-15 11:43:29 +01:00
gpio-wcd934x.c gpio: wcd934x: Fix logic of wcd_gpio_get 2020-02-10 10:50:58 +01:00
gpio-wcove.c gpio: wcove: Split out to_ireg() helper and deduplicate the code 2021-02-15 11:43:32 +01:00
gpio-winbond.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c gpio: ws16c48: Use irqchip template 2020-07-23 15:08:55 +02:00
gpio-xgene-sb.c gpio: xgene-sb: Drop extra check to call acpi_gpiochip_request_interrupts() 2020-05-18 09:16:31 +02:00
gpio-xgene.c gpio: Use new GPIO_LINE_DIRECTION 2019-11-07 09:27:48 +01:00
gpio-xgs-iproc.c This is the bulk of pin control changes for the v5.6 kernel cycle: 2020-01-29 09:51:36 -08:00
gpio-xilinx.c gpio: xilinx: Correct kernel doc for xgpio_probe() 2021-05-12 13:54:53 +02:00
gpio-xlp.c gpio: xlp: Pass irqchip when adding gpiochip 2019-08-15 09:55:07 +02:00
gpio-xra1403.c gpio: xra1403: remove unneeded spi_set_drvdata() 2020-11-30 17:36:36 +01:00
gpio-xtensa.c gpio: xtensa: fix driver build 2019-12-09 10:40:18 +01:00
gpio-zevio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio-zynq.c gpio: zynq: fix reference leak in zynq_gpio functions 2020-12-02 10:41:02 +01:00
gpiolib-acpi.c gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055 2021-05-05 16:07:40 +02:00
gpiolib-acpi.h gpiolib: Introduce acpi_gpio_dev_init() and call it from core 2021-03-26 14:56:18 +01:00
gpiolib-cdev.c gpiolib: cdev: clear debounce period if line set to output 2021-01-27 15:52:13 +01:00
gpiolib-cdev.h gpiolib: fix sysfs when cdev is not selected 2020-11-05 15:35:40 +01:00
gpiolib-devres.c gpiolib: devres: shrink devm_gpiochip_add_data_with_key() 2020-11-16 11:27:33 +01:00
gpiolib-legacy.c
gpiolib-of.c gpiolib: Move of_node operations to gpiolib-of and correct fwnode use 2021-03-26 14:56:18 +01:00
gpiolib-of.h gpiolib: Bind gpio_device to a driver to enable fw_devlink=on by default 2021-01-27 16:04:10 +01:00
gpiolib-sysfs.c gpio: sysfs: Obey valid_mask 2021-03-31 20:32:38 +02:00
gpiolib-sysfs.h gpiolib: move gpiolib-sysfs function declarations into their own header 2020-07-12 10:22:00 +02:00
gpiolib.c gpiolib: Fold conditionals into a simple ternary operator 2021-03-26 14:56:19 +01:00
gpiolib.h gpio updates for v5.11-rc1 2020-12-09 15:17:24 +01:00