linux/drivers/gpio
Robert Middleton ffb5929e9f gpio:mcp23s08 Fixed missing interrupts
commit 2cd29f2387 upstream.

When an interrupt occurs on an MCP23S08 chip, the INTF register will only
contain one bit as causing the interrupt.  If more than two pins change at
the same time on the chip, this causes one of the pins to not be reported.
This patch fixes the logic for checking if a pin has changed, so that
multiple pins will always cause more than one change.

Signed-off-by: Robert Middleton <robert.middleton@rm5248.com>
Tested-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[bwh: Backported to 3.16:
 - No support for level-triggered interrupts
 - Use mcp->ops->read instead of mcp_read()
 - Device pointer for logging is mcp->chip.dev]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-07-18 18:40:18 +01:00
..
devres.c gpio: Add helpers for optional GPIOs 2014-05-09 13:48:30 +02:00
gpio-74x164.c gpio: 74x164: Driver cleanup 2013-12-12 14:28:12 +01:00
gpio-adnp.c gpio: switch drivers to use new callback 2014-03-18 09:28:30 +01:00
gpio-adp5520.c gpio: adp5520: remove unnecessary OOM messages 2014-05-09 10:54:33 +02:00
gpio-adp5588.c gpio: adp5588: remove unnecessary OOM messages 2014-05-09 10:54:37 +02:00
gpio-amd8111.c gpio: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-03 13:16:09 +01:00
gpio-arizona.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-bcm-kona.c gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings 2016-08-22 22:38:10 +01:00
gpio-bt8xx.c gpio: bt8xx: use devm function for memory allocation 2014-05-16 17:52:36 +02:00
gpio-clps711x.c Linux 3.14-rc6 2014-03-14 10:26:45 +01:00
gpio-cs5535.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-da9052.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-da9055.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-davinci.c gpio: davinci: remove unnecessary OOM messages 2014-05-09 10:54:39 +02:00
gpio-dwapb.c gpio: dwapb: use a second irq chip 2014-05-27 16:20:34 +02:00
gpio-em.c gpio: em: remove unnecessary OOM messages 2014-05-09 10:54:44 +02:00
gpio-ep93xx.c gpio: ep93xx: Use devm_ioremap_resource() 2014-05-27 16:00:58 +02:00
gpio-f7188x.c gpio: f7188x: set can_sleep attribute 2014-01-07 19:02:01 +01:00
gpio-ge.c gpio: ge: Convert to platform driver 2014-04-28 12:35:09 -07:00
gpio-generic.c gpio: generic: add request function pointer 2014-05-23 14:31:51 +02:00
gpio-grgpio.c gpio: grgpio: Make of_device_id array const 2014-05-09 10:57:36 +02:00
gpio-ich.c gpio: ich: set regs and reglen for i3100 and ich6 chipset 2014-05-09 10:28:16 +02:00
gpio-intel-mid.c gpio: intel-mid: Remove potentially harmful code 2016-11-20 01:16:57 +00:00
gpio-iop.c gpio: iop: fix devm_ioremap_resource() return value checking 2014-03-26 10:31:34 +01:00
gpio-it8761e.c gpio: reorganize drivers 2011-06-06 10:10:11 -06:00
gpio-janz-ttl.c gpio: janzttl: use devm function 2014-05-16 17:52:37 +02:00
gpio-kempld.c gpio: gpio-kempld: Fix get_direction return value 2015-06-03 13:27:19 +01:00
gpio-ks8695.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-lp3943.c gpio: lp3943: Remove redundant of_match_ptr helper 2014-01-21 08:29:00 +00:00
gpio-lpc32xx.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-lynxpoint.c gpio: lynxpoint: remove unnecessary OOM messages 2014-05-09 10:54:52 +02:00
gpio-max730x.c gpio: max730x: Remove kfree(ts) in __max730x_remove() 2014-04-28 12:35:09 -07:00
gpio-max732x.c gpio: max732x: Fix possible NULL pointer dereference on i2c_new_dummy error 2014-03-12 14:50:51 +01:00
gpio-max7300.c gpio: max7300: use devm_kzalloc() 2013-03-27 16:05:11 +01:00
gpio-max7301.c gpio: max7301: Reverting "Do not force SPI speed when using OF Platform" 2013-08-23 19:44:28 +02:00
gpio-mc9s08dz60.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-mc33880.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-mcp23s08.c gpio:mcp23s08 Fixed missing interrupts 2017-07-18 18:40:18 +01:00
gpio-ml-ioh.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-mm-lantiq.c GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio 2012-05-21 14:31:53 +01:00
gpio-moxart.c gpio: moxart: remove unnecessary OOM messages 2014-05-09 10:54:56 +02:00
gpio-mpc8xxx.c powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536 2013-12-03 13:10:48 +01:00
gpio-mpc5200.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-msic.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-msm-v1.c gpio_msm: Fix build error due to missing err.h 2013-07-31 00:34:31 +02:00
gpio-msm-v2.c GPIO tree bulk changes for v3.14 2014-01-21 10:09:12 -08:00
gpio-mvebu.c gpio/mvebu: Use irq_domain_add_linear 2017-02-23 03:54:27 +00:00
gpio-mxc.c gpio: mxc: Do not hard code return value 2014-01-02 13:55:53 +01:00
gpio-mxs.c gpio: mxs: Allow for recursive enable_irq_wake() call 2014-03-27 10:11:59 +01:00
gpio-octeon.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-omap.c gpio: omap: prepare and unprepare the debounce clock 2014-05-16 17:52:35 +02:00
gpio-palmas.c gpio: palmas: Make of_device_id array const 2014-05-09 11:01:24 +02:00
gpio-pca953x.c gpio: pca953x: Fix NBANK calculation for PCA9536 2016-11-20 01:16:40 +00:00
gpio-pcf857x.c gpio: pcf857x: Add IRQF_SHARED when request irq 2014-05-28 09:21:04 +02:00
gpio-pch.c gpio: pch: add slab include 2014-05-27 15:15:21 +02:00
gpio-pl061.c gpio: pl061: use BIT() macro instead of shifting bits 2014-05-03 12:16:24 -07:00
gpio-pxa.c gpio: pxa: clamp gpio get value to [0,1] 2014-01-15 08:56:20 +01:00
gpio-rc5t583.c gpio: rc5t583: remove unnecessary OOM messages 2014-05-09 10:55:08 +02:00
gpio-rcar.c gpio: rcar: Add Runtime PM handling for interrupts 2016-03-24 10:01:05 +00:00
gpio-rdc321x.c gpio: rdc321x: remove unnecessary OOM messages 2014-05-09 10:55:15 +02:00
gpio-sa1100.c ARM: 7841/1: sa1100: remove complex GPIO interface 2013-10-29 11:01:02 +00:00
gpio-samsung.c gpio: samsung: Add missing "break" statement 2014-03-27 10:08:59 +01:00
gpio-sch.c gpio-sch: set output level after configuration of direction 2014-04-28 12:35:08 -07:00
gpio-sch311x.c gpio: sch311x: Slightly refactor sch311x_detect for better readability 2014-04-28 12:35:09 -07:00
gpio-sodaville.c gpio: sodaville: fix some error return code on error path 2013-12-20 10:23:18 +01:00
gpio-spear-spics.c gpio: SPEAr: remove unnecessary OOM messages 2014-05-09 10:55:19 +02:00
gpio-sta2x11.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-stmpe.c mfd: stmpe: root out static GPIO and IRQ assignments 2014-05-23 09:41:01 +01:00
gpio-stp-xway.c gpio: gpio-stp-xway.c: fix checkpatch error 2013-03-27 16:05:16 +01:00
gpio-sx150x.c gpio: pl061/sx150x: Remove unneeded include of linux/workqueue.h 2014-04-28 12:35:09 -07:00
gpio-syscon.c gpio: Driver for SYSCON-based GPIOs 2014-03-18 09:28:31 +01:00
gpio-tb10x.c gpio: tb10x: Remove redundant of_match_ptr helper 2014-01-02 14:03:22 +01:00
gpio-tc3589x.c gpio: tc3589x: use gpiolib irqchip helpers 2014-04-28 12:35:07 -07:00
gpio-tegra.c gpio: tegra: Make of_device_id array const 2014-05-09 11:01:53 +02:00
gpio-timberdale.c gpio: timberdale: use devm functions 2014-05-16 17:52:37 +02:00
gpio-tps6586x.c gpio: tps6586x: remove unnecessary OOM messages 2014-05-09 10:55:27 +02:00
gpio-tps65910.c gpio: tps65910: remove unnecessary OOM messages 2014-05-09 10:55:31 +02:00
gpio-tps65912.c gpio: tps65912: fix wrong container_of arguments 2015-03-18 09:58:52 +00:00
gpio-ts5500.c gpio: use dev_get_platdata() 2013-08-16 15:24:35 +02:00
gpio-twl4030.c gpio: twl4030: Remove redundant assignment 2014-03-27 10:06:34 +01:00
gpio-twl6040.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-tz1090-pdc.c gpio-tz1090-pdc: add TZ1090 PDC gpio driver 2013-07-20 19:03:48 +02:00
gpio-tz1090.c gpio-tz1090: Replace commas with semi-colons 2014-03-07 11:57:00 +08:00
gpio-ucb1400.c Linux 3.13-rc3 2013-12-09 14:04:37 +01:00
gpio-viperboard.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-vr41xx.c MIPS: VR41xx: Mark GPIO lines used for IRQ 2014-03-31 18:17:12 +02:00
gpio-vx855.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-wm831x.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-wm8350.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-wm8994.c gpio/pinctrl: make gpio_chip members typed boolean 2013-12-04 14:42:46 +01:00
gpio-xilinx.c gpio: xilinx: Make of_device_id array const 2014-05-09 11:03:03 +02:00
gpio-xtensa.c gpio: xtensa: fix build when XCHAL_HAVE_CP is 0 2014-02-03 09:11:45 +01:00
gpio-zevio.c gpio: zevio: Make of_device_id array const 2014-05-09 11:04:08 +02:00
gpiolib-acpi.c gpio / ACPI: Use pin index and bit length 2014-10-05 13:41:02 -07:00
gpiolib-of.c gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node 2015-03-18 09:58:50 +00:00
gpiolib.c gpiolib: Fix comment referring to gpio_*() in gpiod_*() 2016-05-01 00:06:00 +02:00
gpiolib.h gpio: make of_get_named_gpiod_flags() private 2014-05-21 11:14:46 +02:00
Kconfig gpio: Fix OF build problem on UM 2016-11-20 01:17:13 +00:00
Makefile gpio: omap: add a GPIO_OMAP option instead of using ARCH_OMAP 2014-04-28 12:35:08 -07:00