WSL2-Linux-Kernel/drivers/gpio
Andy Shevchenko b41ba2ec54 gpiolib: Read "gpio-line-names" from a firmware node
On STM32MP1, the GPIO banks are subnodes of pin-controller@50002000,
see arch/arm/boot/dts/stm32mp151.dtsi. The driver for
pin-controller@50002000 is in drivers/pinctrl/stm32/pinctrl-stm32.c
and iterates over all of its DT subnodes when registering each GPIO
bank gpiochip. Each gpiochip has:

  - gpio_chip.parent = dev,
    where dev is the device node of the pin controller
  - gpio_chip.of_node = np,
    which is the OF node of the GPIO bank

Therefore, dev_fwnode(chip->parent) != of_fwnode_handle(chip.of_node),
i.e. pin-controller@50002000 != pin-controller@50002000/gpio@5000*000.

The original code behaved correctly, as it extracted the "gpio-line-names"
from of_fwnode_handle(chip.of_node) = pin-controller@50002000/gpio@5000*000.

To achieve the same behaviour, read property from the firmware node.

Fixes: 7cba1a4d5e ("gpiolib: generalize devprop_gpiochip_set_names() for device properties")
Reported-by: Marek Vasut <marex@denx.de>
Reported-by: Roman Guskov <rguskov@dh-electronics.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-03-08 11:59:17 +01:00
..
Kconfig platform-drivers-x86 for v5.12-1 2021-02-22 08:50:01 -08:00
Makefile gpio: msic: Drop driver from Makefile 2021-02-15 11:43:33 +01:00
TODO gpio: intel-mid: Remove driver for deprecated platform 2021-02-15 11:43:32 +01:00
gpio-74x164.c
gpio-74xx-mmio.c
gpio-104-dio-48e.c
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-adnp.c
gpio-adp5520.c
gpio-adp5588.c
gpio-aggregator.c gpio: aggregator: Remove trailing comma in terminator entries 2021-02-15 11:43:32 +01:00
gpio-altera-a10sr.c
gpio-altera.c
gpio-amd-fch.c
gpio-amd8111.c drivers: gpio: amd8111: use SPDX-License-Identifier 2020-12-08 09:41:32 +01:00
gpio-amdpt.c
gpio-arizona.c gpio: arizona: disable pm_runtime in case of failure 2020-12-02 10:40:54 +01:00
gpio-aspeed-sgpio.c
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-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-bd71828.c gpio: bd7xxxx: use helper variable for pdev->dev 2021-02-15 11:43:27 +01:00
gpio-brcmstb.c
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-clps711x.c
gpio-creg-snps.c
gpio-crystalcove.c
gpio-cs5535.c gpio: cs5535: Simplify the return expression of cs5535_gpio_probe() 2020-12-12 01:37:46 +01:00
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
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-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-ftgpio010.c
gpio-ge.c
gpio-gpio-mm.c
gpio-grgpio.c
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-htc-egpio.c
gpio-ich.c
gpio-iop.c
gpio-it87.c
gpio-ixp4xx.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-logicvc.c
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-madera.c
gpio-max730x.c
gpio-max732x.c
gpio-max3191x.c
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c gpio: max77620: convert comma to semicolon 2021-02-15 11:43:29 +01:00
gpio-max77650.c
gpio-mb86s7x.c
gpio-mc9s08dz60.c
gpio-mc33880.c
gpio-menz127.c
gpio-merrifield.c gpio: merrifield: Make bias configuration available for GPIOs 2021-02-15 11:43:31 +01:00
gpio-ml-ioh.c
gpio-mlxbf.c
gpio-mlxbf2.c
gpio-mm-lantiq.c
gpio-mmio.c
gpio-mockup.c gpio: mockup: Allow probing from device tree 2020-10-29 10:39:09 +01:00
gpio-moxtet.c
gpio-mpc8xxx.c
gpio-mpc5200.c
gpio-msc313.c gpio: msc313: MStar MSC313 GPIO driver 2020-12-05 22:41:22 +01:00
gpio-mt7621.c
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 unused .id_table support 2020-12-04 09:08:54 +01:00
gpio-octeon.c
gpio-omap.c gpio updates for v5.11-rc1 2020-12-09 15:17:24 +01:00
gpio-palmas.c
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-pcf857x.c gpio: pcf857x: Fix missing first interrupt 2021-02-18 15:52:44 +01:00
gpio-pch.c
gpio-pci-idio-16.c
gpio-pcie-idio-24.c gpio: pcie-idio-24: Enable PEX8311 interrupts 2020-11-06 15:19:44 +01:00
gpio-pisosr.c
gpio-pl061.c
gpio-pmic-eic-sprd.c
gpio-pxa.c
gpio-raspberrypi-exp.c
gpio-rc5t583.c
gpio-rcar.c gpio: rcar: Add R-Car V3U (R8A779A0) support 2021-02-15 11:43:27 +01:00
gpio-rda.c
gpio-rdc321x.c
gpio-reg.c
gpio-regmap.c
gpio-sa1100.c
gpio-sama5d2-piobu.c
gpio-sch.c
gpio-sch311x.c
gpio-sifive.c gpio updates for v5.11-rc1 2020-12-09 15:17:24 +01:00
gpio-siox.c
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-sta2x11.c
gpio-stmpe.c gpio: stmpe: Fix forgotten refactoring 2020-10-28 15:51:27 +01:00
gpio-stp-xway.c
gpio-syscon.c
gpio-tb10x.c
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: convert comma to semicolon 2021-02-15 11:43:29 +01:00
gpio-thunderx.c
gpio-timberdale.c
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65910.c gpio: tps65910: use regmap accessors 2020-11-19 08:34:22 +00:00
gpio-tps65912.c
gpio-tps68470.c
gpio-tqmx86.c
gpio-ts4800.c
gpio-ts4900.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-ucb1400.c
gpio-uniphier.c
gpio-vf610.c
gpio-viperboard.c
gpio-visconti.c gpio: visconti: Add Toshiba Visconti GPIO support 2021-02-15 11:43:26 +01:00
gpio-vr41xx.c
gpio-vx855.c gpio: vx855: convert comma to semicolon 2021-02-15 11:43:29 +01:00
gpio-wcd934x.c
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-xgene-sb.c
gpio-xgene.c
gpio-xgs-iproc.c
gpio-xilinx.c gpio: gpio-xilinx: Add check if width exceeds 32 2021-02-15 11:43:33 +01:00
gpio-xlp.c
gpio-xra1403.c gpio: xra1403: remove unneeded spi_set_drvdata() 2020-11-30 17:36:36 +01:00
gpio-xtensa.c
gpio-zevio.c
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: Allow to find GpioInt() resource by name and index 2021-03-08 11:59:17 +01:00
gpiolib-acpi.h gpiolib: acpi: Take into account debounce settings 2020-11-16 14:14:35 +02: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: Bind gpio_device to a driver to enable fw_devlink=on by default 2021-01-27 16:04:10 +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 gpiolib: Unify expectations about ->request() returned value 2020-10-26 15:43:15 +01:00
gpiolib-sysfs.h
gpiolib.c gpiolib: Read "gpio-line-names" from a firmware node 2021-03-08 11:59:17 +01:00
gpiolib.h gpio updates for v5.11-rc1 2020-12-09 15:17:24 +01:00