linux-stable/drivers
Javier Carrasco dd35c3bb9c usb: typec: tipd: fix event checking for tps6598x
commit 409c1cfb5a upstream.

The current interrupt service routine of the tps6598x only reads the
first 64 bits of the INT_EVENT1 and INT_EVENT2 registers, which means
that any event above that range will be ignored, leaving interrupts
unattended. Moreover, those events will not be cleared, and the device
will keep the interrupt enabled.

This issue has been observed while attempting to load patches, and the
'ReadyForPatch' field (bit 81) of INT_EVENT1 was set.

Given that older versions of the tps6598x (1, 2 and 6) provide 8-byte
registers, a mechanism based on the upper byte of the version register
(0x0F) has been included. The manufacturer has confirmed [1] that this
byte is always 0 for older versions, and either 0xF7 (DH parts) or 0xF9
(DK parts) is returned in newer versions (7 and 8).

Read the complete INT_EVENT registers to handle all interrupts generated
by the device and account for the hardware version to select the
register size.

Link: https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1346521/tps65987d-register-command-to-distinguish-between-tps6591-2-6-and-tps65987-8 [1]
Fixes: 0a4c005bd1 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Link: https://lore.kernel.org/r/20240429-tps6598x_fix_event_handling-v3-2-4e8e58dce489@wolfvision.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-25 16:28:39 +02:00
..
accel accel/ivpu: Fix missed error message after VPU rename 2024-05-17 12:14:44 +02:00
accessibility
acpi ACPI: CPPC: Fix access width used for PCC registers 2024-05-02 16:35:30 +02:00
amba
android binder: fix max_thread type inconsistency 2024-05-25 16:28:39 +02:00
ata ata: sata_gemini: Check clk_enable() result 2024-05-17 12:14:41 +02:00
atm
auxdisplay
base regmap: Add regmap_read_bypassed() 2024-05-17 12:14:26 +02:00
bcma
block
bluetooth Bluetooth: qca: fix firmware check error path 2024-05-17 12:15:11 +02:00
bus
cache
cdrom
cdx
char
clk clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI 2024-05-17 12:15:05 +02:00
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma dmaengine: idxd: add a write() method for applications to submit work 2024-05-17 12:15:12 +02:00
dma-buf
dpll
edac EDAC/versal: Do not log total error counts 2024-05-17 12:14:35 +02:00
eisa
extcon
firewire firewire: ohci: fulfill timestamp for some local asynchronous transaction 2024-05-17 12:15:00 +02:00
firmware firmware: microchip: don't unconditionally print validation success 2024-05-17 12:14:36 +02:00
fpga
fsi
gnss
gpio gpiolib: cdev: fix uninitialised kfifo 2024-05-17 12:14:57 +02:00
gpu drm/amd/display: Fix division by zero in setup_dsc_config 2024-05-25 16:28:37 +02:00
greybus
hid
hsi
hte
hv Drivers: hv: vmbus: Don't free ring buffers that couldn't be re-encrypted 2024-05-17 12:14:47 +02:00
hwmon hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us 2024-05-17 12:15:07 +02:00
hwspinlock
hwtracing
i2c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:35:34 +02:00
i3c
idle
iio iio: accel: mxc4005: Reset chip on probe() and resume() 2024-05-17 12:15:03 +02:00
infiniband qibfs: fix dentry leak 2024-05-17 12:14:50 +02:00
input
interconnect
iommu iommu/amd: Enhance def_domain_type to handle untrusted device 2024-05-17 12:15:08 +02:00
ipack
irqchip irqchip/gic-v3-its: Prevent double free on error 2024-05-02 16:35:30 +02:00
isdn
leds
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc misc/pvpanic-pci: register attributes via pci_driver 2024-05-17 12:15:08 +02:00
mmc
most
mtd mtd: diskonchip: work around ubsan link failure 2024-05-02 16:35:31 +02:00
mux
net net: usb: ax88179_178a: fix link status when link is set to down/up 2024-05-25 16:28:39 +02:00
nfc
ntb
nubus
nvdimm
nvme nvme-pci: Add quirk for broken MSIs 2024-05-17 12:15:09 +02:00
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6 2024-05-02 16:35:34 +02:00
pinctrl pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map() 2024-05-17 12:14:24 +02:00
platform platform/x86: ISST: Add Granite Rapids-D to HPM CPU list 2024-05-17 12:14:50 +02:00
pmdomain
pnp
power power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator 2024-05-17 12:14:24 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: core: fix debugfs creation regression 2024-05-17 12:15:09 +02:00
remoteproc
reset
rpmsg
rtc
s390 s390/qeth: Fix kernel panic after setting hsuid 2024-05-17 12:14:33 +02:00
sbus
scsi scsi: hisi_sas: Handle the NCQ error returned by D2H frame 2024-05-17 12:14:44 +02:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: Add timeout for wait operation 2024-05-17 12:15:04 +02:00
soc
soundwire soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-05-02 16:35:32 +02:00
spi spi: microchip-core-qspi: fix setting spi bus clock rate 2024-05-17 12:15:09 +02:00
spmi
ssb
staging
target scsi: target: Fix SELinux error when systemd-modules loads the target module 2024-05-17 12:14:43 +02:00
tc
tee
thermal thermal/debugfs: Prevent use-after-free from occurring after cdev removal 2024-05-17 12:14:29 +02:00
thunderbolt
tty
ufs scsi: ufs: core: Fix MCQ mode dev command timeout 2024-05-17 12:14:40 +02:00
uio uio_hv_generic: Don't free decrypted memory 2024-05-17 12:14:47 +02:00
usb usb: typec: tipd: fix event checking for tps6598x 2024-05-25 16:28:39 +02:00
vdpa
vfio VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-17 12:15:11 +02:00
vhost
video fbdev: fix incorrect address computation in deferred IO 2024-05-02 16:35:31 +02:00
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile