kernel-fxtec-pro1x/drivers/gpio
Taiping Lai 3851aa13f4 gpio: sprd: Clear interrupt when setting the type as edge
[ Upstream commit 5fcface659aab7eac4bd65dd116d98b8f7bb88d5 ]

The raw interrupt status of GPIO maybe set before the interrupt is enabled,
which would trigger the interrupt event once enabled it from user side.
This is the case for edge interrupts only. Adding a clear operation when
setting interrupt type can avoid that.

There're a few considerations for the solution:
1) This issue is for edge interrupt only; The interrupts requested by users
   are IRQ_TYPE_LEVEL_HIGH as default, so clearing interrupt when request
   is useless.
2) The interrupt type can be set to edge when request and following up
   with clearing it though, but the problem is still there once users set
   the interrupt type to level trggier.
3) We can add a clear operation after each time of setting interrupt
   enable bit, but it is redundant for level trigger interrupt.

Therefore, the solution is this patch seems the best for now.

Fixes: 9a3821c2bb ("gpio: Add GPIO driver for Spreadtrum SC9860 platform")
Signed-off-by: Taiping Lai <taiping.lai@unisoc.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-07 08:00:07 +02:00
..
devres.c
gpio-74x164.c
gpio-74xx-mmio.c
gpio-104-dio-48e.c
gpio-104-idi-48.c
gpio-104-idio-16.c
gpio-adnp.c
gpio-adp5520.c
gpio-adp5588.c
gpio-altera-a10sr.c
gpio-altera.c
gpio-amd8111.c
gpio-amdpt.c
gpio-arizona.c gpio: arizona: put pm_runtime in case of failure 2020-07-29 10:16:44 +02:00
gpio-aspeed.c gpio/aspeed: Fix incorrect number of banks 2020-01-27 14:51:13 +01:00
gpio-ath79.c
gpio-bcm-kona.c
gpio-bd9571mwv.c
gpio-brcmstb.c
gpio-bt8xx.c
gpio-clps711x.c
gpio-crystalcove.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-dln2.c
gpio-dwapb.c gpio: dwapb: Append MODULE_ALIAS for platform driver 2020-06-25 15:32:53 +02:00
gpio-eic-sprd.c gpio: eic: sprd: Fix the incorrect EIC offset when toggling 2019-10-17 13:45:10 -07:00
gpio-em.c
gpio-ep93xx.c
gpio-exar.c gpio: exar: Fix bad handling for ida_simple_get error path 2020-06-03 08:19:35 +02:00
gpio-f7188x.c
gpio-ftgpio010.c
gpio-ge.c
gpio-gpio-mm.c
gpio-grgpio.c gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap() 2020-02-24 08:34:36 +01:00
gpio-hlwd.c
gpio-htc-egpio.c
gpio-ich.c
gpio-ingenic.c
gpio-intel-mid.c
gpio-iop.c
gpio-it87.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-ks8695.c
gpio-loongson.c
gpio-loongson1.c
gpio-lp873x.c
gpio-lp3943.c
gpio-lp87565.c
gpio-lpc18xx.c
gpio-lpc32xx.c
gpio-lynxpoint.c
gpio-madera.c
gpio-max730x.c
gpio-max732x.c
gpio-max3191x.c
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c gpio: max77620: Fixup debounce delays 2019-12-01 09:16:09 +01:00
gpio-mb86s7x.c
gpio-mc9s08dz60.c
gpio-mc33880.c
gpio-menz127.c
gpio-merrifield.c
gpio-ml-ioh.c PCI: Move Rohm Vendor ID to generic list 2020-06-22 09:05:23 +02:00
gpio-mm-lantiq.c
gpio-mmio.c
gpio-mockup.c gpio: mockup: fix resource leak in error path 2020-10-07 08:00:04 +02:00
gpio-mpc8xxx.c gpio: mpc8xxx: Add platform device to gpiochip->parent 2020-01-17 19:47:14 +01:00
gpio-mpc5200.c
gpio-msic.c
gpio-mt7621.c
gpio-mvebu.c
gpio-mxc.c
gpio-mxs.c
gpio-octeon.c
gpio-omap.c
gpio-palmas.c
gpio-pca953x.c gpio: pca953x: Fix AI overflow on PCAL6524 2019-12-05 09:20:15 +01:00
gpio-pcf857x.c
gpio-pch.c PCI: Move Rohm Vendor ID to generic list 2020-06-22 09:05:23 +02:00
gpio-pci-idio-16.c
gpio-pcie-idio-24.c
gpio-pisosr.c
gpio-pl061.c
gpio-pmic-eic-sprd.c
gpio-pxa.c
gpio-raspberrypi-exp.c gpio: raspberrypi-exp: decrease refcount on firmware dt node 2019-12-05 09:20:24 +01:00
gpio-rc5t583.c
gpio-rcar.c
gpio-rdc321x.c
gpio-reg.c
gpio-sa1100.c
gpio-sch.c
gpio-sch311x.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sprd.c gpio: sprd: Clear interrupt when setting the type as edge 2020-10-07 08:00:07 +02:00
gpio-sta2x11.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-syscon.c gpio: syscon: Fix possible NULL ptr usage 2019-11-24 08:20:54 +01:00
gpio-tb10x.c
gpio-tc3589x.c gpio: tc35894: fix up tc35894 interrupt configuration 2020-10-07 08:00:04 +02:00
gpio-tegra.c gpio: tegra: mask GPIO IRQs during IRQ shutdown 2020-06-03 08:19:27 +02:00
gpio-tegra186.c
gpio-thunderx.c
gpio-timberdale.c
gpio-tpic2810.c
gpio-tps6586x.c
gpio-tps65086.c
gpio-tps65218.c
gpio-tps65910.c
gpio-tps65912.c
gpio-tps68470.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-vr41xx.c
gpio-vx855.c
gpio-wcove.c
gpio-winbond.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-ws16c48.c
gpio-xgene-sb.c
gpio-xgene.c
gpio-xilinx.c
gpio-xlp.c
gpio-xra1403.c
gpio-xtensa.c
gpio-zevio.c
gpio-zx.c
gpio-zynq.c gpio: zynq: Report gpio direction at boot 2020-02-14 16:33:24 -05:00
gpiolib-acpi.c gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model 2020-04-02 15:28:23 +02:00
gpiolib-devprop.c
gpiolib-legacy.c
gpiolib-of.c
gpiolib-sysfs.c
gpiolib.c gpio: Fix error message on out-of-range GPIO in lookup table 2020-01-17 19:47:00 +01:00
gpiolib.h
Kconfig gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP 2020-02-01 09:37:09 +00:00
Makefile