linux/drivers
Prasad Kumpatla cd5f87fade FROMGIT: regmap-irq: Update interrupt clear register for proper reset
With the existing logic where clear_ack is true (HW doesn.t support
auto clear for ICR), interrupt clear register reset is not handled
properly. Due to this only the first interrupts get processed properly
and further interrupts are blocked due to not resetting interrupt
clear register.

Example for issue case where Invert_ack is false and clear_ack is true:

    Say Default ISR=0x00 & ICR=0x00 and ISR is triggered with 2
    interrupts making ISR = 0x11.

    Step 1: Say ISR is set 0x11 (store status_buff = ISR). ISR needs to
            be cleared with the help of ICR once the Interrupt is processed.

    Step 2: Write ICR = 0x11 (status_buff), this will clear the ISR to 0x00.

    Step 3: Issue - In the existing code, ICR is written with ICR =
            ~(status_buff) i.e ICR = 0xEE -> This will block all the interrupts
            from raising except for interrupts 0 and 4. So expectation here is to
            reset ICR, which will unblock all the interrupts.

            if (chip->clear_ack) {
                 if (chip->ack_invert && !ret)
                  ........
                 else if (!ret)
                     ret = regmap_write(map, reg,
                            ~data->status_buf[i]);

So writing 0 and 0xff (when ack_invert is true) should have no effect, other
than clearing the ACKs just set.

Bug: 216238044
Fixes: 3a6f0fb7b8 ("regmap: irq: Add support to clear ack registers")
Change-Id: I42a884f214b3eacd9d9828078ff1a34a5f21a82f
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20220217085007.30218-1-quic_pkumpatl@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit d04ad245d6
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-5.17)
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-02-18 18:26:58 +00:00
..
accessibility
acpi This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
amba This is the 5.10.78 stable release 2021-11-06 14:22:24 +01:00
android ANDROID: vendor_hooks: Add hooks for binder proc transaction 2022-02-14 18:40:45 +00:00
ata libata: fix checking of DMA state 2021-11-18 14:03:46 +01:00
atm atm: nicstar: register the interrupt handler in the right place 2021-07-19 09:44:52 +02:00
auxdisplay auxdisplay: ht16k33: Fix frame buffer device blanking 2021-11-18 14:04:24 +01:00
base FROMGIT: regmap-irq: Update interrupt clear register for proper reset 2022-02-18 18:26:58 +00:00
bcma bcma: Fix memory leak for internally-handled cores 2021-09-15 09:50:45 +02:00
block This is the 5.10.81 stable release 2021-11-21 14:29:02 +01:00
bluetooth This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
bus bus: ti-sysc: Fix timekeeping_suspended warning on resume 2021-11-18 14:04:15 +01:00
cdrom
char This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
clk Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
clocksource Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
connector
counter counter: 104-quad-8: Return error when invalid mode during ceiling_write 2021-09-15 09:50:38 +02:00
cpufreq Merge branch 'android12-5.10' into android12-5.10-lts 2021-11-19 09:15:03 +01:00
cpuidle This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
crypto This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
dax
dca
devfreq
dio
dma This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
dma-buf UPSTREAM: dma-buf: system_heap: Use 'for_each_sgtable_sg' in pages free flow 2022-02-11 17:30:26 -08:00
edac EDAC/amd64: Handle three rank interleaving mode 2021-11-18 14:04:06 +01:00
eisa
extcon extcon: intel-mrfld: Sync hardware and software state on init 2021-07-19 09:45:00 +02:00
firewire
firmware UPSTREAM: firmware: arm_scmi: Fix type error assignment in voltage protocol 2022-02-11 17:30:23 -08:00
fpga fpga: machxo2-spi: Fix missing error code in machxo2_write_complete() 2021-09-30 10:11:04 +02:00
fsi fsi: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:42 +02:00
gnss
gpio This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
gpu This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
greybus
hid Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
hsi
hv hyperv/vmbus: include linux/bitops.h 2021-11-18 14:03:42 +01:00
hwmon This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
hwspinlock
hwtracing UPSTREAM: coresight: trbe: Fix incorrect access of the sink specific data 2022-02-11 17:30:23 -08:00
i2c This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
i3c
ide
idle
iio iio: adis: do not disabe IRQs in 'adis_init()' 2021-11-18 14:04:19 +01:00
infiniband This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
input This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
interconnect Revert "treewide: Change list_sort to use const pointers" 2021-10-04 11:07:40 +02:00
iommu UPSTREAM: iommu: Fix potential use-after-free during probe 2022-02-18 18:24:28 +00:00
ipack ipack: ipoctal: fix module reference leak 2021-10-06 15:56:01 +02:00
irqchip Revert half of "ANDROID: gic-v3: Add vendor hook to GIC v3" 2022-01-21 13:11:10 +01:00
isdn mISDN: Fix return values of the probe function 2021-11-18 14:03:41 +01:00
leds leds: trigger: audio: Add an activate callback to ensure the initial brightness is set 2021-09-15 09:50:36 +02:00
lightnvm
macintosh
mailbox soc: mediatek: cmdq: add address shift in jump 2021-09-18 13:40:16 +02:00
mcb mcb: fix error handling in mcb_alloc_bus() 2021-09-30 10:11:00 +02:00
md This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
media This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
memory This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
memstick memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() 2021-11-18 14:04:07 +01:00
message
mfd mfd: dln2: Add cell for initializing DLN2 ADC 2021-11-18 14:04:30 +01:00
misc This is the 5.10.75 stable release 2021-10-20 11:53:41 +02:00
mmc This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
most most: fix control-message timeouts 2021-11-18 14:03:51 +01:00
mtd Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
mux
net This is the 5.10.81 stable release 2021-11-21 14:29:02 +01:00
nfc nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails 2021-11-18 14:04:27 +01:00
ntb NTB: perf: Fix an error code in perf_setup_inbuf() 2021-09-22 12:28:02 +02:00
nubus
nvdimm libnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind 2021-09-18 13:40:36 +02:00
nvme Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
nvmem nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells 2021-10-20 11:45:01 +02:00
of This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
opp This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
oprofile
parisc parisc: Move pci_dev_is_behind_card_dino to where it is used 2021-09-26 14:08:59 +02:00
parport parport: remove non-zero check on count 2021-09-18 13:40:34 +02:00
pci This is the 5.10.81 stable release 2021-11-21 14:29:02 +01:00
pcmcia pcmcia: i82092: fix a null pointer dereference bug 2021-08-12 13:22:16 +02:00
perf
phy phy: qcom-snps: Correct the FSEL_MASK 2021-11-18 14:04:20 +01:00
pinctrl This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
platform This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
pnp
power FROMLIST: power_supply: Use of-thermal cdev registration API 2022-02-09 02:38:51 +00:00
powercap
pps
ps3
ptp ptp_pch: Load module automatically if ID matches 2021-10-13 10:04:27 +02:00
pwm This is the 5.10.69 stable release 2021-09-30 18:36:17 +02:00
rapidio
ras
regulator This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
remoteproc UPSTREAM: remoteproc: Fix the wrong default value of is_iomem 2022-02-11 17:30:25 -08:00
reset This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
rpmsg
rtc This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
s390 This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
sbus
scsi UPSTREAM: scsi: ufs: core: Unbreak the reset handler 2022-02-11 17:30:24 -08:00
sfi
sh
siox
slimbus slimbus: ngd: reset dma setup during runtime pm 2021-08-26 08:35:55 -04:00
soc This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
soundwire soundwire: debugfs: use controller id and link_id for debugfs 2021-11-18 14:04:16 +01:00
spi Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
spmi
ssb
staging Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
target Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
tc
tee UPSTREAM: tee: handle lookup of shm with reference count 0 2022-01-26 09:07:27 +00:00
thermal thermal: Fix NULL pointer dereferences in of_thermal_ functions 2021-11-21 13:46:37 +01:00
thunderbolt thunderbolt: Fix port linking by checking all adapters 2021-09-18 13:40:27 +02:00
tty Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
uio
usb UPSTREAM: usb: gadget: rndis: check size of RNDIS_MSG_SET command 2022-02-14 18:39:11 +00:00
vdpa vdpa/mlx5: Avoid destroying MR on empty iotlb 2021-08-26 08:35:42 -04:00
vfio Merge 5.10.67 into android12-5.10-lts 2021-09-30 12:21:03 +02:00
vhost vhost-vdpa: Fix the wrong input in config_cb 2021-10-20 11:45:04 +02:00
video This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
virt
virtio Merge tag 'android12-5.10.81_r00' into android12-5.10 2022-01-21 09:35:04 +01:00
visorbus visorbus: fix error return code in visorchipset_init() 2021-07-14 16:56:41 +02:00
vlynq
vme
w1 w1: ds2438: fixing bug that would always get page0 2021-07-20 16:05:39 +02:00
watchdog This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
xen xen-pciback: Fix return in pm_ctrl_init() 2021-11-18 14:04:25 +01:00
zorro
Kconfig
Makefile