phy: rockchip-inno-usb2: Fix muxed interrupt support
authorSamuel Holland <samuel@sholland.org>
Thu, 14 Apr 2022 03:22:52 +0000 (22:22 -0500)
committerVinod Koul <vkoul@kernel.org>
Wed, 20 Apr 2022 09:14:03 +0000 (14:44 +0530)
commit6a98df08ccd55e87947d253b19925691763e755c
tree2d58f5fb90c93fce0f38f8f6412a30935122a812
parent74d0cd478622c87c1665e19ea9217f298648581d
phy: rockchip-inno-usb2: Fix muxed interrupt support

This commit fixes two issues with the muxed interrupt handler. First,
the OTG port has the "bvalid" interrupt enabled, not "linestate". Since
only the linestate interrupt was handled, and not the bvalid interrupt,
plugging in a cable to the OTG port caused an interrupt storm.

Second, the return values from the individual port IRQ handlers need to
be OR-ed together. Otherwise, the lack of an interrupt from the last
port would cause the handler to erroneously return IRQ_NONE.

Fixes: ed2b5a8e6b98 ("phy: phy-rockchip-inno-usb2: support muxed interrupts")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220414032258.40984-2-samuel@sholland.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/rockchip/phy-rockchip-inno-usb2.c