linux-stable/drivers/gpio
H. Nikolaus Schaller d5dbf9c266 gpio: pca953x: fix address calculation for pcal6524
The register constants are so far defined in a way that they fit
for the pcal9555a when shifted by the number of banks, i.e. are
multiplied by 2 in the accessor function.

Now, the pcal6524 has 3 banks which means the relative offset
is multiplied by 4 for the standard registers.

Simply applying the bit shift to the extended registers gives
a wrong result, since the base offset is already included in
the offset.

Therefore, we have to add code to the 24 bit accessor functions
that adjusts the register number for these exended registers.

The formula finally used was developed and proposed by
Andy Shevchenko <andy.shevchenko@gmail.com>.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-23 13:49:40 +02:00
..
devres.c gpio: Export devm_gpiod_get_from_of_node() for consumers 2018-01-12 11:05:24 +01:00
gpio-74x164.c The is the bulk of GPIO changes for the v4.16 kernel cycle. 2018-01-31 12:25:27 -08:00
gpio-74xx-mmio.c gpio: 74xx-mmio: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-104-dio-48e.c gpio: 104-dio-48e: make array 'ports' static, shrinks object size 2018-05-16 14:35:24 +02:00
gpio-104-idi-48.c gpio: make several const arrays static, shrinks object size 2018-05-16 14:35:24 +02:00
gpio-104-idio-16.c gpio: 104-idio-16: Implement get_multiple callback 2018-03-26 10:10:18 +02:00
gpio-adnp.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-adp5520.c gpio: adp5520: Include proper header 2018-01-13 22:12:07 +01:00
gpio-adp5588.c gpio: adp5588: Include proper header 2018-01-13 22:14:56 +01:00
gpio-altera-a10sr.c gpio: altera-a10sr: constify gpio_chip structure 2017-08-14 15:01:12 +02:00
gpio-altera.c gpio: altera: Include GPIO driver header 2018-01-13 22:18:34 +01:00
gpio-amd8111.c gpio: amd8111: Include proper header 2018-01-13 22:22:49 +01:00
gpio-amdpt.c
gpio-arizona.c gpio: arizona: Include proper header 2018-01-13 22:47:48 +01:00
gpio-aspeed.c gpio: fix aspeed_gpio_banks array size check 2017-12-28 13:53:06 +01:00
gpio-ath79.c gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe() 2018-03-27 15:42:29 +02:00
gpio-bcm-kona.c The is the bulk of GPIO changes for the v4.16 kernel cycle. 2018-01-31 12:25:27 -08:00
gpio-bd9571mwv.c
gpio-brcmstb.c The is the bulk of GPIO changes for the v4.16 kernel cycle. 2018-01-31 12:25:27 -08:00
gpio-bt8xx.c gpio: bt8xx: Include proper header 2018-01-13 22:56:52 +01:00
gpio-clps711x.c
gpio-crystalcove.c gpio: crystalcove: Include proper header 2018-01-14 01:48:48 +01:00
gpio-cs5535.c gpio: cs5535: Include proper header 2018-01-14 01:56:24 +01:00
gpio-da9052.c gpio: da905x: Include proper header 2018-01-14 02:00:10 +01:00
gpio-da9055.c gpio: da905x: Include proper header 2018-01-14 02:00:10 +01:00
gpio-davinci.c gpio: davinci: add support for pinmux gpio ranges 2018-02-12 09:36:06 +01:00
gpio-dln2.c gpio: dln2: Include proper header 2018-03-19 01:50:07 +01:00
gpio-dwapb.c gpio: dwapb: Rework support for 1 interrupt per port A GPIO 2018-05-23 11:30:13 +02:00
gpio-eic-sprd.c gpio: eic: Add edge trigger emulation for EIC 2018-05-16 14:35:24 +02:00
gpio-em.c gpio: em: Use the right include 2018-03-19 01:50:07 +01:00
gpio-ep93xx.c
gpio-exar.c gpio: exar: Use correct property prefix and document bindings 2017-08-01 13:43:55 +02:00
gpio-f7188x.c
gpio-ftgpio010.c gpio: ftgpio010: Drop of_gpio.h include 2018-03-19 01:50:24 +01:00
gpio-ge.c gpio: ge: Fix build warning 2018-05-16 14:35:24 +02:00
gpio-gpio-mm.c gpio: make several const arrays static, shrinks object size 2018-05-16 14:35:24 +02:00
gpio-grgpio.c gpio: grgpio: Include the right header 2018-03-19 01:50:28 +01:00
gpio-hlwd.c gpio: Add GPIO driver for Nintendo Wii 2018-02-22 13:54:35 +01:00
gpio-htc-egpio.c gpio: htc-gpio: Include the right header 2018-03-19 01:50:28 +01:00
gpio-ich.c gpio: ich: Use BIT() macro 2018-03-19 01:50:29 +01:00
gpio-ingenic.c gpio: ingenic: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-intel-mid.c gpio-intel-mid: Delete an error message 2018-02-22 15:29:05 +01:00
gpio-iop.c gpio: iop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2017-12-02 22:42:21 +01:00
gpio-it87.c gpio: it87: Include the right header 2018-03-19 01:50:29 +01:00
gpio-janz-ttl.c gpio: janz-ttl: Use BIT() macro 2018-03-19 01:50:30 +01:00
gpio-kempld.c gpio: kempld: Include the right header 2018-03-19 01:50:31 +01:00
gpio-ks8695.c gpio: ks8695: Include the right header 2018-03-19 01:50:31 +01:00
gpio-loongson.c gpio: loongson: Use BIT() macros 2018-05-16 14:35:24 +02:00
gpio-loongson1.c gpio: loongson1: fix bgpio usage 2017-10-25 11:25:38 +02:00
gpio-lp873x.c gpio: lp873x: Include the right header 2018-05-16 14:35:24 +02:00
gpio-lp3943.c gpio: lp3943: Include the right header 2018-05-16 14:35:24 +02:00
gpio-lp87565.c gpio: lp87565: Set proper output level and direction for direction_output 2017-07-31 15:26:57 +02:00
gpio-lpc18xx.c
gpio-lpc32xx.c gpio: lpc32xx: Include the right header 2018-05-16 14:35:24 +02:00
gpio-lynxpoint.c gpio: lynxpoint: Include the right header 2018-05-16 14:35:24 +02:00
gpio-max730x.c gpio: max730x: Include the right header 2018-05-16 14:35:24 +02:00
gpio-max732x.c gpio: max732x: Remove duplicate NULL check 2017-11-29 13:25:23 +01:00
gpio-max3191x.c gpio: Remove VLA from MAX3191X driver 2018-03-27 15:18:06 +02:00
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c gpio: max77620: Make regmap_irq_chip const 2017-08-14 16:06:24 +02:00
gpio-mb86s7x.c gpio: mb86s70: Revert "Return error if requesting an already assigned gpio" 2017-10-31 13:13:34 +01:00
gpio-mc9s08dz60.c gpio: mc9s08dz60: Include the right header 2018-05-16 14:35:24 +02:00
gpio-mc33880.c gpio: mc33880: Include the right header 2018-05-16 14:35:24 +02:00
gpio-menz127.c
gpio-merrifield.c gpio: merrifield: Delete an error message 2018-02-22 15:25:40 +01:00
gpio-ml-ioh.c gpio: ml_ioh: Include the right header 2018-05-16 14:35:24 +02:00
gpio-mm-lantiq.c gpio: mm-lantiq: Include the right header 2018-05-16 14:35:24 +02:00
gpio-mmio.c gpio: mmio: Also read bits that are zero 2018-01-16 23:42:36 +01:00
gpio-mockup.c gpio: mockup: use the SPDX identifier and remove license boilerplate 2018-05-16 14:35:24 +02:00
gpio-mpc8xxx.c gpio: mpc8xxx: Do not reverse bits using bgpio 2017-10-25 11:25:40 +02:00
gpio-mpc5200.c
gpio-msic.c gpio: msic: Include the right header 2018-05-16 14:35:24 +02:00
gpio-mvebu.c gpio: mvebu: Use the proper APIs 2018-05-16 14:35:24 +02:00
gpio-mxc.c gpio: mxc: Remove reliance on <linux/gpio.h> 2018-05-16 14:35:24 +02:00
gpio-mxs.c gpio: mxs: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-octeon.c
gpio-omap.c gpio: omap: Improve a size determination 2018-02-22 15:25:32 +01:00
gpio-palmas.c gpio: palmas: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-pca953x.c gpio: pca953x: fix address calculation for pcal6524 2018-05-23 13:49:40 +02:00
gpio-pcf857x.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-pch.c gpio: pch: use devres for irq generic chip 2017-08-21 00:08:52 +02:00
gpio-pci-idio-16.c gpio: pci-idio-16: Implement get_multiple callback 2018-03-26 10:24:06 +02:00
gpio-pcie-idio-24.c gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks 2018-03-26 10:24:55 +02:00
gpio-pisosr.c
gpio-pl061.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-pmic-eic-sprd.c gpio: pmic_eic: Add edge trigger emulation for PMIC EIC 2018-05-16 14:35:24 +02:00
gpio-pxa.c gpio: pxa: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-raspberrypi-exp.c gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service 2018-02-22 13:49:59 +01:00
gpio-rc5t583.c
gpio-rcar.c Linux 4.16-rc5 2018-03-18 17:48:59 +01:00
gpio-rdc321x.c
gpio-reg.c gpio: gpio-reg: fix build 2017-12-22 15:24:31 +01:00
gpio-sa1100.c
gpio-sch.c
gpio-sch311x.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c gpio: Add GPIO driver for Spreadtrum SC9860 platform 2018-03-02 11:00:43 +01:00
gpio-sta2x11.c gpio: sta2x11: use devres for irq generic chip 2017-08-21 00:06:04 +02:00
gpio-stmpe.c gpio: stmpe: Delete an unnecessary variable initialisation in stmpe_gpio_probe() 2018-01-17 07:44:16 +01:00
gpio-stp-xway.c
gpio-syscon.c gpio: syscon: allow fetching syscon from parent node 2018-05-23 10:07:26 +02:00
gpio-tb10x.c gpio: tb10x: Handle return value of devm_kasprintf 2017-09-21 14:14:17 +02:00
gpio-tc3589x.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-tegra.c gpio: tegra: Convert to use DEFINE_SHOW_ATTRIBUTE macro 2018-02-22 15:25:40 +01:00
gpio-tegra186.c gpio: tegra186: Remove tegra186_gpio_lock_class 2017-11-13 11:43:10 +01:00
gpio-thunderx.c gpio: thunderx: fix error return code in thunderx_gpio_probe() 2018-01-11 10:49:32 +01:00
gpio-timberdale.c gpio: timberdale: Improve a size determination 2018-02-22 15:14:58 +01:00
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65910.c
gpio-tps65912.c
gpio-tps68470.c gpio: tps68470: Update to SPDX license identifier 2018-02-23 15:26:42 +01:00
gpio-ts4800.c
gpio-ts4900.c gpio: ts4900: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-ts5500.c
gpio-twl4030.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
gpio-twl6040.c gpio: twl6040: remove unneeded forward declaration 2017-08-23 10:20:16 +02:00
gpio-ucb1400.c
gpio-uniphier.c gpio: uniphier: fix mismatch between license text and MODULE_LICENSE 2017-11-30 15:37:42 +01:00
gpio-vf610.c gpio: vf610: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-viperboard.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wcove.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-winbond.c gpio: winbond: Add driver 2018-01-09 14:51:00 +01:00
gpio-wm831x.c gpio-wm831x: Use seq_putc() in wm831x_gpio_dbg_show() 2018-02-12 09:36:06 +01:00
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c gpio: ws16c48: Implement get_multiple callback 2018-03-26 10:28:19 +02:00
gpio-xgene-sb.c genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
gpio-xgene.c
gpio-xilinx.c gpio: Convert to using %pOF instead of full_name 2017-08-14 15:01:12 +02:00
gpio-xlp.c gpio: xlp: Use of_device_get_match_data() 2018-05-16 14:35:24 +02:00
gpio-xra1403.c gpio: xra1403: Switch to a fixed upper bound for registers 2018-04-27 01:06:21 +02:00
gpio-xtensa.c
gpio-zevio.c gpio: zevio: make gpio_chip const 2017-08-23 09:21:54 +02:00
gpio-zx.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
gpio-zynq.c gpio: zynq: Setup chip->base based on alias ID 2018-05-23 11:43:03 +02:00
gpiolib-acpi.c This is the bulk of pin control changes for the v4.16 kernel cycle: 2018-02-02 14:22:53 -08:00
gpiolib-devprop.c gpio: fix "gpio-line-names" property retrieval 2017-12-22 15:24:31 +01:00
gpiolib-legacy.c
gpiolib-of.c gpio: Convert to use match_string() helper 2018-05-16 14:35:24 +02:00
gpiolib-sysfs.c gpio: sysfs: avoid using kstrtol() in 'value' attribute write 2017-12-20 10:34:58 +01:00
gpiolib.c gpiolib: fix gpiochip_machine_hog() 2018-05-16 14:35:24 +02:00
gpiolib.h gpio: include consumer header in gpiolib.h 2018-02-22 15:30:31 +01:00
Kconfig This is the bulk of GPIO changes for the v4.17 kernel cycle: 2018-04-05 09:51:41 -07:00
Makefile This is the bulk of GPIO changes for the v4.17 kernel cycle: 2018-04-05 09:51:41 -07:00